Skip to content

Commit ee53faf

Browse files
SparrowLiicuviper
authored andcommitted
Fixes epsilon
1 parent c49f511 commit ee53faf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ops/euclid.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ mod tests {
273273
assert_eq!(RemEuclid::rem_euclid(-x,y),2);
274274
let x: $t = $t::min_value()+1;
275275
let y: $t = -1;
276-
assert_eq!(DivEuclid::div_euclid(x,y),$t::MAX);
276+
assert_eq!(DivEuclid::div_euclid(x,y),$t::max_value());
277277
}
278278
)+
279279
};
@@ -292,13 +292,13 @@ mod tests {
292292
let x: $t = 12.1;
293293
let y: $t = 3.2;
294294
assert!(DivEuclid::div_euclid(x,y)*y+RemEuclid::rem_euclid(x,y)-x
295-
<=46.4 * $t::EPSILON);
295+
<=46.4 * <$t as ::Float>::epsilon());
296296
assert!(DivEuclid::div_euclid(x,-y)*-y+RemEuclid::rem_euclid(x,-y)-x
297-
<= 46.4 * $t::EPSILON);
297+
<= 46.4 * <$t as ::Float>::epsilon());
298298
assert!(DivEuclid::div_euclid(-x,y)*y+RemEuclid::rem_euclid(-x,y)-(-x)
299-
<= 46.4 * $t::EPSILON);
299+
<= 46.4 * <$t as ::Float>::epsilon());
300300
assert!(DivEuclid::div_euclid(-x,-y)*-y+RemEuclid::rem_euclid(-x,-y)-(-x)
301-
<= 46.4 * $t::EPSILON);
301+
<= 46.4 * <$t as ::Float>::epsilon());
302302
}
303303
)+
304304
};

0 commit comments

Comments
 (0)