2020-07-14 12:59:59 +00:00
|
|
|
error: hypotenuse can be computed more accurately
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/floating_point_hypot.rs:6:13
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (x * x + y * y).sqrt();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.hypot(y)`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::imprecise-flops` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::imprecise_flops)]`
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
error: hypotenuse can be computed more accurately
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/floating_point_hypot.rs:7:13
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
|
LL | let _ = ((x + 1f32) * (x + 1f32) + y * y).sqrt();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 1f32).hypot(y)`
|
|
|
|
|
|
|
|
error: hypotenuse can be computed more accurately
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/floating_point_hypot.rs:8:13
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (x.powi(2) + y.powi(2)).sqrt();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.hypot(y)`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|