From b495ea9de539c1fb710ddbf1d5d4d070333888a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Fern=C3=A1ndez=20Serrata?= <76864299+Rudxain@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:51:22 -0400 Subject: [PATCH] `total_cmp` -0 in `fabs` test --- src/math/fabs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/fabs.rs b/src/math/fabs.rs index b2255ad32..5094d1089 100644 --- a/src/math/fabs.rs +++ b/src/math/fabs.rs @@ -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);