Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit dc85c13

Browse files
committed
Account for sign bit
1 parent c27c761 commit dc85c13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/core_simd/tests/ops_impl/float_macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ macro_rules! float_tests {
387387
// all of the mantissa digits set to 1, pushed up to the MSB.
388388
const ALL_MANTISSA_BITS: $int_scalar = ((1 << <$scalar>::MANTISSA_DIGITS) - 1);
389389
const MAX_REPRESENTABLE_VALUE: $int_scalar =
390-
ALL_MANTISSA_BITS << (core::mem::size_of::<$scalar>() * 8 as usize - <$scalar>::MANTISSA_DIGITS as usize);
390+
ALL_MANTISSA_BITS << (core::mem::size_of::<$scalar>() * 8 - <$scalar>::MANTISSA_DIGITS as usize - 1);
391391
const VALUES: [$scalar; 16] = [
392392
-0.0,
393393
0.0,

0 commit comments

Comments
 (0)