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