]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/floating_point_powf.stderr
Auto merge of #71631 - RalfJung:miri-unleash-the-gates, r=oli-obk
[rust.git] / src / tools / clippy / tests / ui / floating_point_powf.stderr
1 error: exponent for bases 2 and e can be computed more accurately
2   --> $DIR/floating_point_powf.rs:6:13
3    |
4 LL |     let _ = 2f32.powf(x);
5    |             ^^^^^^^^^^^^ help: consider using: `x.exp2()`
6    |
7    = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
8
9 error: exponent for bases 2 and e can be computed more accurately
10   --> $DIR/floating_point_powf.rs:7:13
11    |
12 LL |     let _ = 2f32.powf(3.1);
13    |             ^^^^^^^^^^^^^^ help: consider using: `3.1f32.exp2()`
14
15 error: exponent for bases 2 and e can be computed more accurately
16   --> $DIR/floating_point_powf.rs:8:13
17    |
18 LL |     let _ = 2f32.powf(-3.1);
19    |             ^^^^^^^^^^^^^^^ help: consider using: `(-3.1f32).exp2()`
20
21 error: exponent for bases 2 and e can be computed more accurately
22   --> $DIR/floating_point_powf.rs:9:13
23    |
24 LL |     let _ = std::f32::consts::E.powf(x);
25    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()`
26
27 error: exponent for bases 2 and e can be computed more accurately
28   --> $DIR/floating_point_powf.rs:10:13
29    |
30 LL |     let _ = std::f32::consts::E.powf(3.1);
31    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `3.1f32.exp()`
32
33 error: exponent for bases 2 and e can be computed more accurately
34   --> $DIR/floating_point_powf.rs:11:13
35    |
36 LL |     let _ = std::f32::consts::E.powf(-3.1);
37    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(-3.1f32).exp()`
38
39 error: square-root of a number can be computed more efficiently and accurately
40   --> $DIR/floating_point_powf.rs:12:13
41    |
42 LL |     let _ = x.powf(1.0 / 2.0);
43    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.sqrt()`
44
45 error: cube-root of a number can be computed more accurately
46   --> $DIR/floating_point_powf.rs:13:13
47    |
48 LL |     let _ = x.powf(1.0 / 3.0);
49    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.cbrt()`
50    |
51    = note: `-D clippy::imprecise-flops` implied by `-D warnings`
52
53 error: exponentiation with integer powers can be computed more efficiently
54   --> $DIR/floating_point_powf.rs:14:13
55    |
56 LL |     let _ = x.powf(2.0);
57    |             ^^^^^^^^^^^ help: consider using: `x.powi(2)`
58
59 error: exponentiation with integer powers can be computed more efficiently
60   --> $DIR/floating_point_powf.rs:15:13
61    |
62 LL |     let _ = x.powf(-2.0);
63    |             ^^^^^^^^^^^^ help: consider using: `x.powi(-2)`
64
65 error: exponentiation with integer powers can be computed more efficiently
66   --> $DIR/floating_point_powf.rs:16:13
67    |
68 LL |     let _ = x.powf(16_777_215.0);
69    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(16_777_215)`
70
71 error: exponentiation with integer powers can be computed more efficiently
72   --> $DIR/floating_point_powf.rs:17:13
73    |
74 LL |     let _ = x.powf(-16_777_215.0);
75    |             ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(-16_777_215)`
76
77 error: exponent for bases 2 and e can be computed more accurately
78   --> $DIR/floating_point_powf.rs:25:13
79    |
80 LL |     let _ = 2f64.powf(x);
81    |             ^^^^^^^^^^^^ help: consider using: `x.exp2()`
82
83 error: exponent for bases 2 and e can be computed more accurately
84   --> $DIR/floating_point_powf.rs:26:13
85    |
86 LL |     let _ = 2f64.powf(3.1);
87    |             ^^^^^^^^^^^^^^ help: consider using: `3.1f64.exp2()`
88
89 error: exponent for bases 2 and e can be computed more accurately
90   --> $DIR/floating_point_powf.rs:27:13
91    |
92 LL |     let _ = 2f64.powf(-3.1);
93    |             ^^^^^^^^^^^^^^^ help: consider using: `(-3.1f64).exp2()`
94
95 error: exponent for bases 2 and e can be computed more accurately
96   --> $DIR/floating_point_powf.rs:28:13
97    |
98 LL |     let _ = std::f64::consts::E.powf(x);
99    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()`
100
101 error: exponent for bases 2 and e can be computed more accurately
102   --> $DIR/floating_point_powf.rs:29:13
103    |
104 LL |     let _ = std::f64::consts::E.powf(3.1);
105    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `3.1f64.exp()`
106
107 error: exponent for bases 2 and e can be computed more accurately
108   --> $DIR/floating_point_powf.rs:30:13
109    |
110 LL |     let _ = std::f64::consts::E.powf(-3.1);
111    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(-3.1f64).exp()`
112
113 error: square-root of a number can be computed more efficiently and accurately
114   --> $DIR/floating_point_powf.rs:31:13
115    |
116 LL |     let _ = x.powf(1.0 / 2.0);
117    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.sqrt()`
118
119 error: cube-root of a number can be computed more accurately
120   --> $DIR/floating_point_powf.rs:32:13
121    |
122 LL |     let _ = x.powf(1.0 / 3.0);
123    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.cbrt()`
124
125 error: exponentiation with integer powers can be computed more efficiently
126   --> $DIR/floating_point_powf.rs:33:13
127    |
128 LL |     let _ = x.powf(2.0);
129    |             ^^^^^^^^^^^ help: consider using: `x.powi(2)`
130
131 error: exponentiation with integer powers can be computed more efficiently
132   --> $DIR/floating_point_powf.rs:34:13
133    |
134 LL |     let _ = x.powf(-2.0);
135    |             ^^^^^^^^^^^^ help: consider using: `x.powi(-2)`
136
137 error: exponentiation with integer powers can be computed more efficiently
138   --> $DIR/floating_point_powf.rs:35:13
139    |
140 LL |     let _ = x.powf(-2_147_483_648.0);
141    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(-2_147_483_648)`
142
143 error: exponentiation with integer powers can be computed more efficiently
144   --> $DIR/floating_point_powf.rs:36:13
145    |
146 LL |     let _ = x.powf(2_147_483_647.0);
147    |             ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(2_147_483_647)`
148
149 error: aborting due to 24 previous errors
150