|
1 | 1 | error: logarithm for bases 2, 10 and e can be computed more accurately
|
2 |
| - --> $DIR/floating_point_arithmetic.rs:9:13 |
| 2 | + --> $DIR/floating_point_log.rs:9:13 |
3 | 3 | |
|
4 | 4 | LL | let _ = x.log(2f32);
|
5 | 5 | | ^^^^^^^^^^^ help: consider using: `x.log2()`
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::floating-point-improvements` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: logarithm for bases 2, 10 and e can be computed more accurately
|
10 |
| - --> $DIR/floating_point_arithmetic.rs:10:13 |
| 10 | + --> $DIR/floating_point_log.rs:10:13 |
11 | 11 | |
|
12 | 12 | LL | let _ = x.log(10f32);
|
13 | 13 | | ^^^^^^^^^^^^ help: consider using: `x.log10()`
|
14 | 14 |
|
15 | 15 | error: logarithm for bases 2, 10 and e can be computed more accurately
|
16 |
| - --> $DIR/floating_point_arithmetic.rs:11:13 |
| 16 | + --> $DIR/floating_point_log.rs:11:13 |
17 | 17 | |
|
18 | 18 | LL | let _ = x.log(std::f32::consts::E);
|
19 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.ln()`
|
20 | 20 |
|
21 | 21 | error: logarithm for bases 2, 10 and e can be computed more accurately
|
22 |
| - --> $DIR/floating_point_arithmetic.rs:12:13 |
| 22 | + --> $DIR/floating_point_log.rs:12:13 |
23 | 23 | |
|
24 | 24 | LL | let _ = x.log(TWO);
|
25 | 25 | | ^^^^^^^^^^ help: consider using: `x.log2()`
|
26 | 26 |
|
27 | 27 | error: logarithm for bases 2, 10 and e can be computed more accurately
|
28 |
| - --> $DIR/floating_point_arithmetic.rs:13:13 |
| 28 | + --> $DIR/floating_point_log.rs:13:13 |
29 | 29 | |
|
30 | 30 | LL | let _ = x.log(E);
|
31 | 31 | | ^^^^^^^^ help: consider using: `x.ln()`
|
32 | 32 |
|
33 | 33 | error: logarithm for bases 2, 10 and e can be computed more accurately
|
34 |
| - --> $DIR/floating_point_arithmetic.rs:16:13 |
| 34 | + --> $DIR/floating_point_log.rs:16:13 |
35 | 35 | |
|
36 | 36 | LL | let _ = x.log(2f64);
|
37 | 37 | | ^^^^^^^^^^^ help: consider using: `x.log2()`
|
38 | 38 |
|
39 | 39 | error: logarithm for bases 2, 10 and e can be computed more accurately
|
40 |
| - --> $DIR/floating_point_arithmetic.rs:17:13 |
| 40 | + --> $DIR/floating_point_log.rs:17:13 |
41 | 41 | |
|
42 | 42 | LL | let _ = x.log(10f64);
|
43 | 43 | | ^^^^^^^^^^^^ help: consider using: `x.log10()`
|
44 | 44 |
|
45 | 45 | error: logarithm for bases 2, 10 and e can be computed more accurately
|
46 |
| - --> $DIR/floating_point_arithmetic.rs:18:13 |
| 46 | + --> $DIR/floating_point_log.rs:18:13 |
47 | 47 | |
|
48 | 48 | LL | let _ = x.log(std::f64::consts::E);
|
49 | 49 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.ln()`
|
50 | 50 |
|
51 | 51 | error: ln(1 + x) can be computed more accurately
|
52 |
| - --> $DIR/floating_point_arithmetic.rs:23:13 |
| 52 | + --> $DIR/floating_point_log.rs:23:13 |
53 | 53 | |
|
54 | 54 | LL | let _ = (1.0 + x).ln();
|
55 | 55 | | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
|
56 | 56 |
|
57 | 57 | error: ln(1 + x) can be computed more accurately
|
58 |
| - --> $DIR/floating_point_arithmetic.rs:24:13 |
| 58 | + --> $DIR/floating_point_log.rs:24:13 |
59 | 59 | |
|
60 | 60 | LL | let _ = (1.0 + x * 2.0).ln();
|
61 | 61 | | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x * 2.0).ln_1p()`
|
62 | 62 |
|
63 | 63 | error: ln(1 + x) can be computed more accurately
|
64 |
| - --> $DIR/floating_point_arithmetic.rs:25:13 |
| 64 | + --> $DIR/floating_point_log.rs:25:13 |
65 | 65 | |
|
66 | 66 | LL | let _ = (1.0 + x.powi(2)).ln();
|
67 | 67 | | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(2).ln_1p()`
|
68 | 68 |
|
69 | 69 | error: ln(1 + x) can be computed more accurately
|
70 |
| - --> $DIR/floating_point_arithmetic.rs:26:13 |
| 70 | + --> $DIR/floating_point_log.rs:26:13 |
71 | 71 | |
|
72 | 72 | LL | let _ = (1.0 + x.powi(2) * 2.0).ln();
|
73 | 73 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x.powi(2) * 2.0).ln_1p()`
|
74 | 74 |
|
75 | 75 | error: ln(1 + x) can be computed more accurately
|
76 |
| - --> $DIR/floating_point_arithmetic.rs:27:13 |
| 76 | + --> $DIR/floating_point_log.rs:27:13 |
77 | 77 | |
|
78 | 78 | LL | let _ = (1.0 + (std::f32::consts::E - 1.0)).ln();
|
79 | 79 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `((std::f32::consts::E - 1.0)).ln_1p()`
|
80 | 80 |
|
81 | 81 | error: ln(1 + x) can be computed more accurately
|
82 |
| - --> $DIR/floating_point_arithmetic.rs:34:13 |
| 82 | + --> $DIR/floating_point_log.rs:34:13 |
83 | 83 | |
|
84 | 84 | LL | let _ = (1.0 + x).ln();
|
85 | 85 | | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
|
86 | 86 |
|
87 | 87 | error: ln(1 + x) can be computed more accurately
|
88 |
| - --> $DIR/floating_point_arithmetic.rs:35:13 |
| 88 | + --> $DIR/floating_point_log.rs:35:13 |
89 | 89 | |
|
90 | 90 | LL | let _ = (1.0 + x * 2.0).ln();
|
91 | 91 | | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x * 2.0).ln_1p()`
|
92 | 92 |
|
93 | 93 | error: ln(1 + x) can be computed more accurately
|
94 |
| - --> $DIR/floating_point_arithmetic.rs:36:13 |
| 94 | + --> $DIR/floating_point_log.rs:36:13 |
95 | 95 | |
|
96 | 96 | LL | let _ = (1.0 + x.powi(2)).ln();
|
97 | 97 | | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(2).ln_1p()`
|
98 | 98 |
|
99 |
| -error: exponent for bases 2 and e can be computed more accurately |
100 |
| - --> $DIR/floating_point_arithmetic.rs:45:13 |
101 |
| - | |
102 |
| -LL | let _ = 2f32.powf(x); |
103 |
| - | ^^^^^^^^^^^^ help: consider using: `x.exp2()` |
104 |
| - |
105 |
| -error: exponent for bases 2 and e can be computed more accurately |
106 |
| - --> $DIR/floating_point_arithmetic.rs:46:13 |
107 |
| - | |
108 |
| -LL | let _ = std::f32::consts::E.powf(x); |
109 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()` |
110 |
| - |
111 |
| -error: square-root of a number can be computed more efficiently and accurately |
112 |
| - --> $DIR/floating_point_arithmetic.rs:47: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_arithmetic.rs:48: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_arithmetic.rs:49: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_arithmetic.rs:50:13 |
131 |
| - | |
132 |
| -LL | let _ = x.powf(-2.0); |
133 |
| - | ^^^^^^^^^^^^ help: consider using: `x.powi(-2)` |
134 |
| - |
135 |
| -error: exponent for bases 2 and e can be computed more accurately |
136 |
| - --> $DIR/floating_point_arithmetic.rs:57:13 |
137 |
| - | |
138 |
| -LL | let _ = 2f64.powf(x); |
139 |
| - | ^^^^^^^^^^^^ help: consider using: `x.exp2()` |
140 |
| - |
141 |
| -error: exponent for bases 2 and e can be computed more accurately |
142 |
| - --> $DIR/floating_point_arithmetic.rs:58:13 |
143 |
| - | |
144 |
| -LL | let _ = std::f64::consts::E.powf(x); |
145 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()` |
146 |
| - |
147 |
| -error: square-root of a number can be computed more efficiently and accurately |
148 |
| - --> $DIR/floating_point_arithmetic.rs:59:13 |
149 |
| - | |
150 |
| -LL | let _ = x.powf(1.0 / 2.0); |
151 |
| - | ^^^^^^^^^^^^^^^^^ help: consider using: `x.sqrt()` |
152 |
| - |
153 |
| -error: cube-root of a number can be computed more accurately |
154 |
| - --> $DIR/floating_point_arithmetic.rs:60:13 |
155 |
| - | |
156 |
| -LL | let _ = x.powf(1.0 / 3.0); |
157 |
| - | ^^^^^^^^^^^^^^^^^ help: consider using: `x.cbrt()` |
158 |
| - |
159 |
| -error: exponentiation with integer powers can be computed more efficiently |
160 |
| - --> $DIR/floating_point_arithmetic.rs:61:13 |
161 |
| - | |
162 |
| -LL | let _ = x.powf(2.0); |
163 |
| - | ^^^^^^^^^^^ help: consider using: `x.powi(2)` |
164 |
| - |
165 |
| -error: exponentiation with integer powers can be computed more efficiently |
166 |
| - --> $DIR/floating_point_arithmetic.rs:62:13 |
167 |
| - | |
168 |
| -LL | let _ = x.powf(-2.0); |
169 |
| - | ^^^^^^^^^^^^ help: consider using: `x.powi(-2)` |
170 |
| - |
171 |
| -error: (e.pow(x) - 1) can be computed more accurately |
172 |
| - --> $DIR/floating_point_arithmetic.rs:71:13 |
173 |
| - | |
174 |
| -LL | let _ = x.exp() - 1.0; |
175 |
| - | ^^^^^^^^^^^^^ help: consider using: `x.exp_m1()` |
176 |
| - |
177 |
| -error: (e.pow(x) - 1) can be computed more accurately |
178 |
| - --> $DIR/floating_point_arithmetic.rs:72:13 |
179 |
| - | |
180 |
| -LL | let _ = x.exp() - 1.0 + 2.0; |
181 |
| - | ^^^^^^^^^^^^^ help: consider using: `x.exp_m1()` |
182 |
| - |
183 |
| -error: (e.pow(x) - 1) can be computed more accurately |
184 |
| - --> $DIR/floating_point_arithmetic.rs:78:13 |
185 |
| - | |
186 |
| -LL | let _ = x.exp() - 1.0; |
187 |
| - | ^^^^^^^^^^^^^ help: consider using: `x.exp_m1()` |
188 |
| - |
189 |
| -error: (e.pow(x) - 1) can be computed more accurately |
190 |
| - --> $DIR/floating_point_arithmetic.rs:79:13 |
191 |
| - | |
192 |
| -LL | let _ = x.exp() - 1.0 + 2.0; |
193 |
| - | ^^^^^^^^^^^^^ help: consider using: `x.exp_m1()` |
194 |
| - |
195 | 99 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
196 |
| - --> $DIR/floating_point_arithmetic.rs:90:13 |
| 100 | + --> $DIR/floating_point_log.rs:48:13 |
197 | 101 | |
|
198 | 102 | LL | let _ = x.log2() / y.log2();
|
199 | 103 | | ^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
200 | 104 |
|
201 | 105 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
202 |
| - --> $DIR/floating_point_arithmetic.rs:91:13 |
| 106 | + --> $DIR/floating_point_log.rs:49:13 |
203 | 107 | |
|
204 | 108 | LL | let _ = x.log10() / y.log10();
|
205 | 109 | | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
206 | 110 |
|
207 | 111 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
208 |
| - --> $DIR/floating_point_arithmetic.rs:92:13 |
| 112 | + --> $DIR/floating_point_log.rs:50:13 |
209 | 113 | |
|
210 | 114 | LL | let _ = x.ln() / y.ln();
|
211 | 115 | | ^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
212 | 116 |
|
213 | 117 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
214 |
| - --> $DIR/floating_point_arithmetic.rs:93:13 |
| 118 | + --> $DIR/floating_point_log.rs:51:13 |
215 | 119 | |
|
216 | 120 | LL | let _ = x.log(4.0) / y.log(4.0);
|
217 | 121 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
218 | 122 |
|
219 | 123 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
220 |
| - --> $DIR/floating_point_arithmetic.rs:94:13 |
| 124 | + --> $DIR/floating_point_log.rs:52:13 |
221 | 125 | |
|
222 | 126 | LL | let _ = x.log(b) / y.log(b);
|
223 | 127 | | ^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
224 | 128 |
|
225 | 129 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
226 |
| - --> $DIR/floating_point_arithmetic.rs:96:13 |
| 130 | + --> $DIR/floating_point_log.rs:54:13 |
227 | 131 | |
|
228 | 132 | LL | let _ = x.log(b) / 2f32.log(b);
|
229 | 133 | | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log2()`
|
230 | 134 |
|
231 | 135 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
232 |
| - --> $DIR/floating_point_arithmetic.rs:102:13 |
| 136 | + --> $DIR/floating_point_log.rs:60:13 |
233 | 137 | |
|
234 | 138 | LL | let _ = x.log2() / y.log2();
|
235 | 139 | | ^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
236 | 140 |
|
237 | 141 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
238 |
| - --> $DIR/floating_point_arithmetic.rs:103:13 |
| 142 | + --> $DIR/floating_point_log.rs:61:13 |
239 | 143 | |
|
240 | 144 | LL | let _ = x.log10() / y.log10();
|
241 | 145 | | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
242 | 146 |
|
243 | 147 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
244 |
| - --> $DIR/floating_point_arithmetic.rs:104:13 |
| 148 | + --> $DIR/floating_point_log.rs:62:13 |
245 | 149 | |
|
246 | 150 | LL | let _ = x.ln() / y.ln();
|
247 | 151 | | ^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
248 | 152 |
|
249 | 153 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
250 |
| - --> $DIR/floating_point_arithmetic.rs:105:13 |
| 154 | + --> $DIR/floating_point_log.rs:63:13 |
251 | 155 | |
|
252 | 156 | LL | let _ = x.log(4.0) / y.log(4.0);
|
253 | 157 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
254 | 158 |
|
255 | 159 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
256 |
| - --> $DIR/floating_point_arithmetic.rs:106:13 |
| 160 | + --> $DIR/floating_point_log.rs:64:13 |
257 | 161 | |
|
258 | 162 | LL | let _ = x.log(b) / y.log(b);
|
259 | 163 | | ^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
|
260 | 164 |
|
261 | 165 | error: x.log(b) / y.log(b) can be reduced to x.log(y)
|
262 |
| - --> $DIR/floating_point_arithmetic.rs:108:13 |
| 166 | + --> $DIR/floating_point_log.rs:66:13 |
263 | 167 | |
|
264 | 168 | LL | let _ = x.log(b) / 2f64.log(b);
|
265 | 169 | | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log2()`
|
266 | 170 |
|
267 |
| -error: aborting due to 44 previous errors |
| 171 | +error: aborting due to 28 previous errors |
268 | 172 |
|
0 commit comments