|
1 | 1 | error: multiply and add expressions can be calculated more efficiently and accurately
|
2 |
| - --> $DIR/floating_point_mul_add.rs:10:13 |
| 2 | + --> $DIR/floating_point_mul_add.rs:21:13 |
3 | 3 | |
|
4 | 4 | LL | let _ = a * b + c;
|
5 | 5 | | ^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: multiply and add expressions can be calculated more efficiently and accurately
|
10 |
| - --> $DIR/floating_point_mul_add.rs:11:13 |
| 10 | + --> $DIR/floating_point_mul_add.rs:22:13 |
11 | 11 | |
|
12 | 12 | LL | let _ = c + a * b;
|
13 | 13 | | ^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
|
14 | 14 |
|
15 | 15 | error: multiply and add expressions can be calculated more efficiently and accurately
|
16 |
| - --> $DIR/floating_point_mul_add.rs:12:13 |
| 16 | + --> $DIR/floating_point_mul_add.rs:23:13 |
17 | 17 | |
|
18 | 18 | LL | let _ = a + 2.0 * 4.0;
|
19 | 19 | | ^^^^^^^^^^^^^ help: consider using: `2.0f64.mul_add(4.0, a)`
|
20 | 20 |
|
21 | 21 | error: multiply and add expressions can be calculated more efficiently and accurately
|
22 |
| - --> $DIR/floating_point_mul_add.rs:13:13 |
| 22 | + --> $DIR/floating_point_mul_add.rs:24:13 |
23 | 23 | |
|
24 | 24 | LL | let _ = a + 2. * 4.;
|
25 | 25 | | ^^^^^^^^^^^ help: consider using: `2.0f64.mul_add(4., a)`
|
26 | 26 |
|
27 | 27 | error: multiply and add expressions can be calculated more efficiently and accurately
|
28 |
| - --> $DIR/floating_point_mul_add.rs:15:13 |
| 28 | + --> $DIR/floating_point_mul_add.rs:26:13 |
29 | 29 | |
|
30 | 30 | LL | let _ = (a * b) + c;
|
31 | 31 | | ^^^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
|
32 | 32 |
|
33 | 33 | error: multiply and add expressions can be calculated more efficiently and accurately
|
34 |
| - --> $DIR/floating_point_mul_add.rs:16:13 |
| 34 | + --> $DIR/floating_point_mul_add.rs:27:13 |
35 | 35 | |
|
36 | 36 | LL | let _ = c + (a * b);
|
37 | 37 | | ^^^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
|
38 | 38 |
|
39 | 39 | error: multiply and add expressions can be calculated more efficiently and accurately
|
40 |
| - --> $DIR/floating_point_mul_add.rs:17:13 |
| 40 | + --> $DIR/floating_point_mul_add.rs:28:13 |
41 | 41 | |
|
42 | 42 | LL | let _ = a * b * c + d;
|
43 | 43 | | ^^^^^^^^^^^^^ help: consider using: `(a * b).mul_add(c, d)`
|
44 | 44 |
|
45 | 45 | error: multiply and add expressions can be calculated more efficiently and accurately
|
46 |
| - --> $DIR/floating_point_mul_add.rs:19:13 |
| 46 | + --> $DIR/floating_point_mul_add.rs:30:13 |
47 | 47 | |
|
48 | 48 | LL | let _ = a.mul_add(b, c) * a.mul_add(b, c) + a.mul_add(b, c) + c;
|
49 | 49 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `a.mul_add(b, c).mul_add(a.mul_add(b, c), a.mul_add(b, c))`
|
50 | 50 |
|
51 | 51 | error: multiply and add expressions can be calculated more efficiently and accurately
|
52 |
| - --> $DIR/floating_point_mul_add.rs:20:13 |
| 52 | + --> $DIR/floating_point_mul_add.rs:31:13 |
53 | 53 | |
|
54 | 54 | LL | let _ = 1234.567_f64 * 45.67834_f64 + 0.0004_f64;
|
55 | 55 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1234.567_f64.mul_add(45.67834_f64, 0.0004_f64)`
|
56 | 56 |
|
57 | 57 | error: multiply and add expressions can be calculated more efficiently and accurately
|
58 |
| - --> $DIR/floating_point_mul_add.rs:22:13 |
| 58 | + --> $DIR/floating_point_mul_add.rs:33:13 |
59 | 59 | |
|
60 | 60 | LL | let _ = (a * a + b).sqrt();
|
61 | 61 | | ^^^^^^^^^^^ help: consider using: `a.mul_add(a, b)`
|
|
0 commit comments