From 541369c38e6fac164198fd4298e043b34ccbef9f Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Tue, 6 Oct 2020 12:30:19 -0700 Subject: [PATCH] use NEG_INFINITY and NAN constants instead computing them --- crates/core_simd/tests/ops_impl/float_macros.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/core_simd/tests/ops_impl/float_macros.rs b/crates/core_simd/tests/ops_impl/float_macros.rs index 708b4d14327..141cb52207b 100644 --- a/crates/core_simd/tests/ops_impl/float_macros.rs +++ b/crates/core_simd/tests/ops_impl/float_macros.rs @@ -29,17 +29,16 @@ macro_rules! float_tests { <$scalar>::MIN, <$scalar>::MAX, <$scalar>::INFINITY, - -<$scalar>::INFINITY, + <$scalar>::NEG_INFINITY, <$scalar>::MIN_POSITIVE, -<$scalar>::MIN_POSITIVE, <$scalar>::EPSILON, -<$scalar>::EPSILON, - 0.0 / 0.0, - -0.0 / 0.0, - // Still not sure if wasm can have weird nans, or I'd check them - // too. Until then - 1.0 / 3.0, - -1.0 / 4.0 + <$scalar>::NAN, + -<$scalar>::NAN, + // TODO: Would be nice to check sNaN... + 100.0 / 3.0, + -100.0 / 3.0, ]; #[test]