]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/floating_point_log.stderr
Rollup merge of #99474 - aDotInTheVoid:rustdoc-json-noinline-test-cleanup, r=CraftSpider
[rust.git] / src / tools / clippy / 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:10:13
3    |
4 LL |     let _ = x.log(2f32);
5    |             ^^^^^^^^^^^ help: consider using: `x.log2()`
6    |
7    = note: `-D clippy::suboptimal-flops` 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:11: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:12: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:13: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:14: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:17: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:18: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:19: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:24:13
53    |
54 LL |     let _ = (1f32 + 2.).ln();
55    |             ^^^^^^^^^^^^^^^^ help: consider using: `2.0f32.ln_1p()`
56    |
57    = note: `-D clippy::imprecise-flops` implied by `-D warnings`
58
59 error: ln(1 + x) can be computed more accurately
60   --> $DIR/floating_point_log.rs:25:13
61    |
62 LL |     let _ = (1f32 + 2.0).ln();
63    |             ^^^^^^^^^^^^^^^^^ help: consider using: `2.0f32.ln_1p()`
64
65 error: ln(1 + x) can be computed more accurately
66   --> $DIR/floating_point_log.rs:26:13
67    |
68 LL |     let _ = (1.0 + x).ln();
69    |             ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
70
71 error: ln(1 + x) can be computed more accurately
72   --> $DIR/floating_point_log.rs:27:13
73    |
74 LL |     let _ = (1.0 + x / 2.0).ln();
75    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
76
77 error: ln(1 + x) can be computed more accurately
78   --> $DIR/floating_point_log.rs:28:13
79    |
80 LL |     let _ = (1.0 + x.powi(3)).ln();
81    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
82
83 error: ln(1 + x) can be computed more accurately
84   --> $DIR/floating_point_log.rs:29:13
85    |
86 LL |     let _ = (1.0 + x.powi(3) / 2.0).ln();
87    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x.powi(3) / 2.0).ln_1p()`
88
89 error: ln(1 + x) can be computed more accurately
90   --> $DIR/floating_point_log.rs:30:13
91    |
92 LL |     let _ = (1.0 + (std::f32::consts::E - 1.0)).ln();
93    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(std::f32::consts::E - 1.0).ln_1p()`
94
95 error: ln(1 + x) can be computed more accurately
96   --> $DIR/floating_point_log.rs:31:13
97    |
98 LL |     let _ = (x + 1.0).ln();
99    |             ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
100
101 error: ln(1 + x) can be computed more accurately
102   --> $DIR/floating_point_log.rs:32:13
103    |
104 LL |     let _ = (x.powi(3) + 1.0).ln();
105    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
106
107 error: ln(1 + x) can be computed more accurately
108   --> $DIR/floating_point_log.rs:33:13
109    |
110 LL |     let _ = (x + 2.0 + 1.0).ln();
111    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 2.0).ln_1p()`
112
113 error: ln(1 + x) can be computed more accurately
114   --> $DIR/floating_point_log.rs:34:13
115    |
116 LL |     let _ = (x / 2.0 + 1.0).ln();
117    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
118
119 error: ln(1 + x) can be computed more accurately
120   --> $DIR/floating_point_log.rs:42:13
121    |
122 LL |     let _ = (1f64 + 2.).ln();
123    |             ^^^^^^^^^^^^^^^^ help: consider using: `2.0f64.ln_1p()`
124
125 error: ln(1 + x) can be computed more accurately
126   --> $DIR/floating_point_log.rs:43:13
127    |
128 LL |     let _ = (1f64 + 2.0).ln();
129    |             ^^^^^^^^^^^^^^^^^ help: consider using: `2.0f64.ln_1p()`
130
131 error: ln(1 + x) can be computed more accurately
132   --> $DIR/floating_point_log.rs:44:13
133    |
134 LL |     let _ = (1.0 + x).ln();
135    |             ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
136
137 error: ln(1 + x) can be computed more accurately
138   --> $DIR/floating_point_log.rs:45:13
139    |
140 LL |     let _ = (1.0 + x / 2.0).ln();
141    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
142
143 error: ln(1 + x) can be computed more accurately
144   --> $DIR/floating_point_log.rs:46:13
145    |
146 LL |     let _ = (1.0 + x.powi(3)).ln();
147    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
148
149 error: ln(1 + x) can be computed more accurately
150   --> $DIR/floating_point_log.rs:47:13
151    |
152 LL |     let _ = (x + 1.0).ln();
153    |             ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
154
155 error: ln(1 + x) can be computed more accurately
156   --> $DIR/floating_point_log.rs:48:13
157    |
158 LL |     let _ = (x.powi(3) + 1.0).ln();
159    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
160
161 error: ln(1 + x) can be computed more accurately
162   --> $DIR/floating_point_log.rs:49:13
163    |
164 LL |     let _ = (x + 2.0 + 1.0).ln();
165    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 2.0).ln_1p()`
166
167 error: ln(1 + x) can be computed more accurately
168   --> $DIR/floating_point_log.rs:50:13
169    |
170 LL |     let _ = (x / 2.0 + 1.0).ln();
171    |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
172
173 error: aborting due to 28 previous errors
174