]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/floating_point_mul_add.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / floating_point_mul_add.stderr
CommitLineData
f20569fa 1error: multiply and add expressions can be calculated more efficiently and accurately
a2a8927a 2 --> $DIR/floating_point_mul_add.rs:21:13
f20569fa
XL
3 |
4LL | let _ = a * b + c;
5 | ^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
6 |
7 = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
8
9error: multiply and add expressions can be calculated more efficiently and accurately
a2a8927a 10 --> $DIR/floating_point_mul_add.rs:22:13
f20569fa 11 |
2b03887a
FG
12LL | let _ = a * b - c;
13 | ^^^^^^^^^ help: consider using: `a.mul_add(b, -c)`
14
15error: multiply and add expressions can be calculated more efficiently and accurately
16 --> $DIR/floating_point_mul_add.rs:23:13
17 |
f20569fa
XL
18LL | let _ = c + a * b;
19 | ^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
20
21error: multiply and add expressions can be calculated more efficiently and accurately
2b03887a
FG
22 --> $DIR/floating_point_mul_add.rs:24:13
23 |
24LL | let _ = c - a * b;
25 | ^^^^^^^^^ help: consider using: `a.mul_add(-b, c)`
26
27error: multiply and add expressions can be calculated more efficiently and accurately
28 --> $DIR/floating_point_mul_add.rs:25:13
f20569fa
XL
29 |
30LL | let _ = a + 2.0 * 4.0;
31 | ^^^^^^^^^^^^^ help: consider using: `2.0f64.mul_add(4.0, a)`
32
33error: multiply and add expressions can be calculated more efficiently and accurately
2b03887a 34 --> $DIR/floating_point_mul_add.rs:26:13
f20569fa
XL
35 |
36LL | let _ = a + 2. * 4.;
37 | ^^^^^^^^^^^ help: consider using: `2.0f64.mul_add(4., a)`
38
39error: multiply and add expressions can be calculated more efficiently and accurately
2b03887a 40 --> $DIR/floating_point_mul_add.rs:28:13
f20569fa
XL
41 |
42LL | let _ = (a * b) + c;
43 | ^^^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
44
45error: multiply and add expressions can be calculated more efficiently and accurately
2b03887a 46 --> $DIR/floating_point_mul_add.rs:29:13
f20569fa
XL
47 |
48LL | let _ = c + (a * b);
49 | ^^^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
50
51error: multiply and add expressions can be calculated more efficiently and accurately
2b03887a 52 --> $DIR/floating_point_mul_add.rs:30:13
f20569fa
XL
53 |
54LL | let _ = a * b * c + d;
55 | ^^^^^^^^^^^^^ help: consider using: `(a * b).mul_add(c, d)`
56
57error: multiply and add expressions can be calculated more efficiently and accurately
2b03887a 58 --> $DIR/floating_point_mul_add.rs:32:13
f20569fa
XL
59 |
60LL | let _ = a.mul_add(b, c) * a.mul_add(b, c) + a.mul_add(b, c) + c;
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `a.mul_add(b, c).mul_add(a.mul_add(b, c), a.mul_add(b, c))`
62
63error: multiply and add expressions can be calculated more efficiently and accurately
2b03887a 64 --> $DIR/floating_point_mul_add.rs:33:13
f20569fa
XL
65 |
66LL | let _ = 1234.567_f64 * 45.67834_f64 + 0.0004_f64;
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1234.567_f64.mul_add(45.67834_f64, 0.0004_f64)`
68
69error: multiply and add expressions can be calculated more efficiently and accurately
2b03887a 70 --> $DIR/floating_point_mul_add.rs:35:13
f20569fa
XL
71 |
72LL | let _ = (a * a + b).sqrt();
73 | ^^^^^^^^^^^ help: consider using: `a.mul_add(a, b)`
74
2b03887a 75error: aborting due to 12 previous errors
f20569fa 76