fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: multiply and add expressions can be calculated more efficiently and accurately 2 --> $DIR/floating_point_powi.rs:9:13 3 | 4LL | let _ = x.powi(2) + y; 5 | ^^^^^^^^^^^^^ help: consider using: `x.mul_add(x, y)` 6 | 7 = note: `-D clippy::suboptimal-flops` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::suboptimal_flops)]` 9 10error: multiply and add expressions can be calculated more efficiently and accurately 11 --> $DIR/floating_point_powi.rs:10:13 12 | 13LL | let _ = x.powi(2) - y; 14 | ^^^^^^^^^^^^^ help: consider using: `x.mul_add(x, -y)` 15 16error: multiply and add expressions can be calculated more efficiently and accurately 17 --> $DIR/floating_point_powi.rs:11:13 18 | 19LL | let _ = x + y.powi(2); 20 | ^^^^^^^^^^^^^ help: consider using: `y.mul_add(y, x)` 21 22error: multiply and add expressions can be calculated more efficiently and accurately 23 --> $DIR/floating_point_powi.rs:12:13 24 | 25LL | let _ = x - y.powi(2); 26 | ^^^^^^^^^^^^^ help: consider using: `y.mul_add(-y, x)` 27 28error: multiply and add expressions can be calculated more efficiently and accurately 29 --> $DIR/floating_point_powi.rs:13:13 30 | 31LL | let _ = x + (y as f32).powi(2); 32 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(y as f32).mul_add(y as f32, x)` 33 34error: multiply and add expressions can be calculated more efficiently and accurately 35 --> $DIR/floating_point_powi.rs:14:13 36 | 37LL | let _ = (x.powi(2) + y).sqrt(); 38 | ^^^^^^^^^^^^^^^ help: consider using: `x.mul_add(x, y)` 39 40error: multiply and add expressions can be calculated more efficiently and accurately 41 --> $DIR/floating_point_powi.rs:15:13 42 | 43LL | let _ = (x + y.powi(2)).sqrt(); 44 | ^^^^^^^^^^^^^^^ help: consider using: `y.mul_add(y, x)` 45 46error: multiply and add expressions can be calculated more efficiently and accurately 47 --> $DIR/floating_point_powi.rs:17:13 48 | 49LL | let _ = (x - 1.0).powi(2) - y; 50 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x - 1.0).mul_add(x - 1.0, -y)` 51 52error: multiply and add expressions can be calculated more efficiently and accurately 53 --> $DIR/floating_point_powi.rs:18:13 54 | 55LL | let _ = (x - 1.0).powi(2) - y + 3.0; 56 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x - 1.0).mul_add(x - 1.0, -y)` 57 58error: multiply and add expressions can be calculated more efficiently and accurately 59 --> $DIR/floating_point_powi.rs:19:13 60 | 61LL | let _ = (x - 1.0).powi(2) - (y + 3.0); 62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x - 1.0).mul_add(x - 1.0, -(y + 3.0))` 63 64error: multiply and add expressions can be calculated more efficiently and accurately 65 --> $DIR/floating_point_powi.rs:20:13 66 | 67LL | let _ = x - (y + 1.0).powi(2); 68 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(y + 1.0).mul_add(-(y + 1.0), x)` 69 70error: multiply and add expressions can be calculated more efficiently and accurately 71 --> $DIR/floating_point_powi.rs:21:13 72 | 73LL | let _ = x - (3.0 * y).powi(2); 74 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(3.0 * y).mul_add(-(3.0 * y), x)` 75 76error: multiply and add expressions can be calculated more efficiently and accurately 77 --> $DIR/floating_point_powi.rs:22:13 78 | 79LL | let _ = x - (y + 1.0 + x).powi(2); 80 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(y + 1.0 + x).mul_add(-(y + 1.0 + x), x)` 81 82error: multiply and add expressions can be calculated more efficiently and accurately 83 --> $DIR/floating_point_powi.rs:23:13 84 | 85LL | let _ = x - (y + 1.0 + 2.0).powi(2); 86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(y + 1.0 + 2.0).mul_add(-(y + 1.0 + 2.0), x)` 87 88error: aborting due to 14 previous errors 89