]> git.lizzy.rs Git - rust.git/blob - tests/ui/floating_point_powf.stderr
Rename `mul_add` test file and add general improvements
[rust.git] / 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 error: exponentiation with integer powers can be computed more efficiently
52   --> $DIR/floating_point_powf.rs:14:13
53    |
54 LL |     let _ = x.powf(2.0);
55    |             ^^^^^^^^^^^ help: consider using: `x.powi(2)`
56
57 error: exponentiation with integer powers can be computed more efficiently
58   --> $DIR/floating_point_powf.rs:15:13
59    |
60 LL |     let _ = x.powf(-2.0);
61    |             ^^^^^^^^^^^^ help: consider using: `x.powi(-2)`
62
63 error: exponentiation with integer powers can be computed more efficiently
64   --> $DIR/floating_point_powf.rs:16:13
65    |
66 LL |     let _ = x.powf(16_777_215.0);
67    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(16_777_215)`
68
69 error: exponentiation with integer powers can be computed more efficiently
70   --> $DIR/floating_point_powf.rs:17:13
71    |
72 LL |     let _ = x.powf(-16_777_215.0);
73    |             ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(-16_777_215)`
74
75 error: exponent for bases 2 and e can be computed more accurately
76   --> $DIR/floating_point_powf.rs:25:13
77    |
78 LL |     let _ = 2f64.powf(x);
79    |             ^^^^^^^^^^^^ help: consider using: `x.exp2()`
80
81 error: exponent for bases 2 and e can be computed more accurately
82   --> $DIR/floating_point_powf.rs:26:13
83    |
84 LL |     let _ = 2f64.powf(3.1);
85    |             ^^^^^^^^^^^^^^ help: consider using: `3.1f64.exp2()`
86
87 error: exponent for bases 2 and e can be computed more accurately
88   --> $DIR/floating_point_powf.rs:27:13
89    |
90 LL |     let _ = 2f64.powf(-3.1);
91    |             ^^^^^^^^^^^^^^^ help: consider using: `(-3.1f64).exp2()`
92
93 error: exponent for bases 2 and e can be computed more accurately
94   --> $DIR/floating_point_powf.rs:28:13
95    |
96 LL |     let _ = std::f64::consts::E.powf(x);
97    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()`
98
99 error: exponent for bases 2 and e can be computed more accurately
100   --> $DIR/floating_point_powf.rs:29:13
101    |
102 LL |     let _ = std::f64::consts::E.powf(3.1);
103    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `3.1f64.exp()`
104
105 error: exponent for bases 2 and e can be computed more accurately
106   --> $DIR/floating_point_powf.rs:30:13
107    |
108 LL |     let _ = std::f64::consts::E.powf(-3.1);
109    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(-3.1f64).exp()`
110
111 error: square-root of a number can be computed more efficiently and accurately
112   --> $DIR/floating_point_powf.rs:31:13
113    |
114 LL |     let _ = x.powf(1.0 / 2.0);
115    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.sqrt()`
116
117 error: cube-root of a number can be computed more accurately
118   --> $DIR/floating_point_powf.rs:32:13
119    |
120 LL |     let _ = x.powf(1.0 / 3.0);
121    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.cbrt()`
122
123 error: exponentiation with integer powers can be computed more efficiently
124   --> $DIR/floating_point_powf.rs:33:13
125    |
126 LL |     let _ = x.powf(2.0);
127    |             ^^^^^^^^^^^ help: consider using: `x.powi(2)`
128
129 error: exponentiation with integer powers can be computed more efficiently
130   --> $DIR/floating_point_powf.rs:34:13
131    |
132 LL |     let _ = x.powf(-2.0);
133    |             ^^^^^^^^^^^^ help: consider using: `x.powi(-2)`
134
135 error: exponentiation with integer powers can be computed more efficiently
136   --> $DIR/floating_point_powf.rs:35:13
137    |
138 LL |     let _ = x.powf(-2_147_483_648.0);
139    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(-2_147_483_648)`
140
141 error: exponentiation with integer powers can be computed more efficiently
142   --> $DIR/floating_point_powf.rs:36:13
143    |
144 LL |     let _ = x.powf(2_147_483_647.0);
145    |             ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(2_147_483_647)`
146
147 error: aborting due to 24 previous errors
148