@@ -31,144 +31,150 @@ LL | let _ = x.log(E);
3131 | ^^^^^^^^ help: consider using: `x.ln()`
3232
3333error: logarithm for bases 2, 10 and e can be computed more accurately
34- --> $DIR/floating_point_log.rs:17:13
34+ --> $DIR/floating_point_log.rs:15:13
35+ |
36+ LL | let _ = (x as f32).log(2f32);
37+ | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x as f32).log2()`
38+
39+ error: logarithm for bases 2, 10 and e can be computed more accurately
40+ --> $DIR/floating_point_log.rs:18:13
3541 |
3642LL | let _ = x.log(2f64);
3743 | ^^^^^^^^^^^ help: consider using: `x.log2()`
3844
3945error: logarithm for bases 2, 10 and e can be computed more accurately
40- --> $DIR/floating_point_log.rs:18 :13
46+ --> $DIR/floating_point_log.rs:19 :13
4147 |
4248LL | let _ = x.log(10f64);
4349 | ^^^^^^^^^^^^ help: consider using: `x.log10()`
4450
4551error: logarithm for bases 2, 10 and e can be computed more accurately
46- --> $DIR/floating_point_log.rs:19 :13
52+ --> $DIR/floating_point_log.rs:20 :13
4753 |
4854LL | let _ = x.log(std::f64::consts::E);
4955 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.ln()`
5056
5157error: ln(1 + x) can be computed more accurately
52- --> $DIR/floating_point_log.rs:24 :13
58+ --> $DIR/floating_point_log.rs:25 :13
5359 |
5460LL | let _ = (1f32 + 2.).ln();
5561 | ^^^^^^^^^^^^^^^^ help: consider using: `2.0f32.ln_1p()`
5662 |
5763 = note: `-D clippy::imprecise-flops` implied by `-D warnings`
5864
5965error: ln(1 + x) can be computed more accurately
60- --> $DIR/floating_point_log.rs:25 :13
66+ --> $DIR/floating_point_log.rs:26 :13
6167 |
6268LL | let _ = (1f32 + 2.0).ln();
6369 | ^^^^^^^^^^^^^^^^^ help: consider using: `2.0f32.ln_1p()`
6470
6571error: ln(1 + x) can be computed more accurately
66- --> $DIR/floating_point_log.rs:26 :13
72+ --> $DIR/floating_point_log.rs:27 :13
6773 |
6874LL | let _ = (1.0 + x).ln();
6975 | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
7076
7177error: ln(1 + x) can be computed more accurately
72- --> $DIR/floating_point_log.rs:27 :13
78+ --> $DIR/floating_point_log.rs:28 :13
7379 |
7480LL | let _ = (1.0 + x / 2.0).ln();
7581 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
7682
7783error: ln(1 + x) can be computed more accurately
78- --> $DIR/floating_point_log.rs:28 :13
84+ --> $DIR/floating_point_log.rs:29 :13
7985 |
8086LL | let _ = (1.0 + x.powi(3)).ln();
8187 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
8288
8389error: ln(1 + x) can be computed more accurately
84- --> $DIR/floating_point_log.rs:29 :13
90+ --> $DIR/floating_point_log.rs:30 :13
8591 |
8692LL | let _ = (1.0 + x.powi(3) / 2.0).ln();
8793 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x.powi(3) / 2.0).ln_1p()`
8894
8995error: ln(1 + x) can be computed more accurately
90- --> $DIR/floating_point_log.rs:30 :13
96+ --> $DIR/floating_point_log.rs:31 :13
9197 |
9298LL | let _ = (1.0 + (std::f32::consts::E - 1.0)).ln();
9399 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(std::f32::consts::E - 1.0).ln_1p()`
94100
95101error: ln(1 + x) can be computed more accurately
96- --> $DIR/floating_point_log.rs:31 :13
102+ --> $DIR/floating_point_log.rs:32 :13
97103 |
98104LL | let _ = (x + 1.0).ln();
99105 | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
100106
101107error: ln(1 + x) can be computed more accurately
102- --> $DIR/floating_point_log.rs:32 :13
108+ --> $DIR/floating_point_log.rs:33 :13
103109 |
104110LL | let _ = (x.powi(3) + 1.0).ln();
105111 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
106112
107113error: ln(1 + x) can be computed more accurately
108- --> $DIR/floating_point_log.rs:33 :13
114+ --> $DIR/floating_point_log.rs:34 :13
109115 |
110116LL | let _ = (x + 2.0 + 1.0).ln();
111117 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 2.0).ln_1p()`
112118
113119error: ln(1 + x) can be computed more accurately
114- --> $DIR/floating_point_log.rs:34 :13
120+ --> $DIR/floating_point_log.rs:35 :13
115121 |
116122LL | let _ = (x / 2.0 + 1.0).ln();
117123 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
118124
119125error: ln(1 + x) can be computed more accurately
120- --> $DIR/floating_point_log.rs:42 :13
126+ --> $DIR/floating_point_log.rs:43 :13
121127 |
122128LL | let _ = (1f64 + 2.).ln();
123129 | ^^^^^^^^^^^^^^^^ help: consider using: `2.0f64.ln_1p()`
124130
125131error: ln(1 + x) can be computed more accurately
126- --> $DIR/floating_point_log.rs:43 :13
132+ --> $DIR/floating_point_log.rs:44 :13
127133 |
128134LL | let _ = (1f64 + 2.0).ln();
129135 | ^^^^^^^^^^^^^^^^^ help: consider using: `2.0f64.ln_1p()`
130136
131137error: ln(1 + x) can be computed more accurately
132- --> $DIR/floating_point_log.rs:44 :13
138+ --> $DIR/floating_point_log.rs:45 :13
133139 |
134140LL | let _ = (1.0 + x).ln();
135141 | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
136142
137143error: ln(1 + x) can be computed more accurately
138- --> $DIR/floating_point_log.rs:45 :13
144+ --> $DIR/floating_point_log.rs:46 :13
139145 |
140146LL | let _ = (1.0 + x / 2.0).ln();
141147 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
142148
143149error: ln(1 + x) can be computed more accurately
144- --> $DIR/floating_point_log.rs:46 :13
150+ --> $DIR/floating_point_log.rs:47 :13
145151 |
146152LL | let _ = (1.0 + x.powi(3)).ln();
147153 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
148154
149155error: ln(1 + x) can be computed more accurately
150- --> $DIR/floating_point_log.rs:47 :13
156+ --> $DIR/floating_point_log.rs:48 :13
151157 |
152158LL | let _ = (x + 1.0).ln();
153159 | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
154160
155161error: ln(1 + x) can be computed more accurately
156- --> $DIR/floating_point_log.rs:48 :13
162+ --> $DIR/floating_point_log.rs:49 :13
157163 |
158164LL | let _ = (x.powi(3) + 1.0).ln();
159165 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
160166
161167error: ln(1 + x) can be computed more accurately
162- --> $DIR/floating_point_log.rs:49 :13
168+ --> $DIR/floating_point_log.rs:50 :13
163169 |
164170LL | let _ = (x + 2.0 + 1.0).ln();
165171 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 2.0).ln_1p()`
166172
167173error: ln(1 + x) can be computed more accurately
168- --> $DIR/floating_point_log.rs:50 :13
174+ --> $DIR/floating_point_log.rs:51 :13
169175 |
170176LL | let _ = (x / 2.0 + 1.0).ln();
171177 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
172178
173- error: aborting due to 28 previous errors
179+ error: aborting due to 29 previous errors
174180
0 commit comments