2020-08-24 09:31:51 -05:00
|
|
|
error: float equality check without `.abs()`
|
|
|
|
--> $DIR/float_equality_without_abs.rs:4:5
|
|
|
|
|
|
|
|
|
LL | (a - b) < f32::EPSILON
|
2020-08-26 09:39:30 -05:00
|
|
|
| -------^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a - b).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::float-equality-without-abs` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:15:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = (a - b) < f32::EPSILON;
|
2020-08-26 09:39:30 -05:00
|
|
|
| -------^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a - b).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:17:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = a - b < f32::EPSILON;
|
2020-08-26 09:39:30 -05:00
|
|
|
| -----^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a - b).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:19:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = a - b.abs() < f32::EPSILON;
|
2020-08-26 09:39:30 -05:00
|
|
|
| -----------^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a - b.abs()).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:21:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = (a as f64 - b as f64) < f64::EPSILON;
|
2020-08-26 09:39:30 -05:00
|
|
|
| ---------------------^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a as f64 - b as f64).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:23:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = 1.0 - 2.0 < f32::EPSILON;
|
2020-08-26 09:39:30 -05:00
|
|
|
| ---------^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(1.0 - 2.0).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:26:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = f32::EPSILON > (a - b);
|
2020-08-26 09:39:30 -05:00
|
|
|
| ^^^^^^^^^^^^^^^-------
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a - b).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:28:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = f32::EPSILON > a - b;
|
2020-08-26 09:39:30 -05:00
|
|
|
| ^^^^^^^^^^^^^^^-----
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a - b).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:30:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = f32::EPSILON > a - b.abs();
|
2020-08-26 09:39:30 -05:00
|
|
|
| ^^^^^^^^^^^^^^^-----------
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a - b.abs()).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:32:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = f64::EPSILON > (a as f64 - b as f64);
|
2020-08-26 09:39:30 -05:00
|
|
|
| ^^^^^^^^^^^^^^^---------------------
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(a as f64 - b as f64).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: float equality check without `.abs()`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/float_equality_without_abs.rs:34:13
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
|
LL | let _ = f32::EPSILON > 1.0 - 2.0;
|
2020-08-26 09:39:30 -05:00
|
|
|
| ^^^^^^^^^^^^^^^---------
|
|
|
|
| |
|
|
|
|
| help: add `.abs()`: `(1.0 - 2.0).abs()`
|
2020-08-24 09:31:51 -05:00
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
|
|
|
|