Fixed the test to not use an epsilon
This commit is contained in:
parent
d8a281ef73
commit
4de301e394
@ -42,7 +42,7 @@ fn is_useless_rounding(expr: &Expr) -> Option<(&str, String)> {
|
||||
} else {
|
||||
""
|
||||
};
|
||||
if f.fract() < f64::EPSILON {
|
||||
if f.fract() == 0.0 {
|
||||
Some((method_name, f_str))
|
||||
} else {
|
||||
None
|
||||
|
@ -5,4 +5,5 @@ fn main() {
|
||||
let _ = 1f32;
|
||||
let _ = 1.0f64;
|
||||
let _ = 1.00f32;
|
||||
let _ = 2e-54f64.floor();
|
||||
}
|
||||
|
@ -5,4 +5,5 @@ fn main() {
|
||||
let _ = 1f32.ceil();
|
||||
let _ = 1.0f64.floor();
|
||||
let _ = 1.00f32.round();
|
||||
let _ = 2e-54f64.floor();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user