Skip to content

Commit 541369c

Browse files
committed
use NEG_INFINITY and NAN constants instead computing them
1 parent 866971a commit 541369c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

crates/core_simd/tests/ops_impl/float_macros.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,16 @@ macro_rules! float_tests {
2929
<$scalar>::MIN,
3030
<$scalar>::MAX,
3131
<$scalar>::INFINITY,
32-
-<$scalar>::INFINITY,
32+
<$scalar>::NEG_INFINITY,
3333
<$scalar>::MIN_POSITIVE,
3434
-<$scalar>::MIN_POSITIVE,
3535
<$scalar>::EPSILON,
3636
-<$scalar>::EPSILON,
37-
0.0 / 0.0,
38-
-0.0 / 0.0,
39-
// Still not sure if wasm can have weird nans, or I'd check them
40-
// too. Until then
41-
1.0 / 3.0,
42-
-1.0 / 4.0
37+
<$scalar>::NAN,
38+
-<$scalar>::NAN,
39+
// TODO: Would be nice to check sNaN...
40+
100.0 / 3.0,
41+
-100.0 / 3.0,
4342
];
4443

4544
#[test]

0 commit comments

Comments
 (0)