Skip to content

Commit

Permalink
total_cmp -0 in fabs test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudxain authored Apr 11, 2024
1 parent 439db66 commit b495ea9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/math/fabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mod tests {
fn spec_tests() {
assert!(fabs(NAN).is_nan());
for f in [0.0, -0.0].iter().copied() {
assert_eq!(fabs(f), 0.0);
assert_eq!(fabs(f).total_cmp(&0.0), core::cmp::Ordering::Equal);
}
for f in [INFINITY, NEG_INFINITY].iter().copied() {
assert_eq!(fabs(f), INFINITY);
Expand Down

0 comments on commit b495ea9

Please sign in to comment.