rust/tests/ui/floating_point_hypot.stderr

23 lines
809 B
Plaintext
Raw Normal View History

error: hypotenuse can be computed more accurately
2023-07-27 06:40:22 -05:00
--> $DIR/floating_point_hypot.rs:6:13
|
LL | let _ = (x * x + y * y).sqrt();
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.hypot(y)`
|
= note: `-D clippy::imprecise-flops` implied by `-D warnings`
error: hypotenuse can be computed more accurately
2023-07-27 06:40:22 -05:00
--> $DIR/floating_point_hypot.rs:7:13
|
LL | let _ = ((x + 1f32) * (x + 1f32) + y * y).sqrt();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 1f32).hypot(y)`
error: hypotenuse can be computed more accurately
2023-07-27 06:40:22 -05:00
--> $DIR/floating_point_hypot.rs:8:13
|
LL | let _ = (x.powi(2) + y.powi(2)).sqrt();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.hypot(y)`
2020-06-17 11:43:11 -05:00
error: aborting due to 3 previous errors