these tests seem to work fine on i586 these days · qinheping/verify-rust-std@fc9b01f (original) (raw)
`@@ -2,31 +2,24 @@ use crate::f32::consts;
`
2
2
`use crate::num::{FpCategory as Fp, *};
`
3
3
``
4
4
`/// Smallest number
`
5
``
`-
#[allow(dead_code)] // unused on x86
`
6
5
`const TINY_BITS: u32 = 0x1;
`
7
6
``
8
7
`/// Next smallest number
`
9
``
`-
#[allow(dead_code)] // unused on x86
`
10
8
`const TINY_UP_BITS: u32 = 0x2;
`
11
9
``
12
10
`/// Exponent = 0b11...10, Sifnificand 0b1111..10. Min val > 0
`
13
``
`-
#[allow(dead_code)] // unused on x86
`
14
11
`const MAX_DOWN_BITS: u32 = 0x7f7f_fffe;
`
15
12
``
16
13
`/// Zeroed exponent, full significant
`
17
``
`-
#[allow(dead_code)] // unused on x86
`
18
14
`const LARGEST_SUBNORMAL_BITS: u32 = 0x007f_ffff;
`
19
15
``
20
16
`/// Exponent = 0b1, zeroed significand
`
21
``
`-
#[allow(dead_code)] // unused on x86
`
22
17
`const SMALLEST_NORMAL_BITS: u32 = 0x0080_0000;
`
23
18
``
24
19
`/// First pattern over the mantissa
`
25
``
`-
#[allow(dead_code)] // unused on x86
`
26
20
`const NAN_MASK1: u32 = 0x002a_aaaa;
`
27
21
``
28
22
`/// Second pattern over the mantissa
`
29
``
`-
#[allow(dead_code)] // unused on x86
`
30
23
`const NAN_MASK2: u32 = 0x0055_5555;
`
31
24
``
32
25
`#[allow(unused_macros)]
`
`@@ -353,9 +346,6 @@ fn test_is_sign_negative() {
`
353
346
`assert!((-f32::NAN).is_sign_negative());
`
354
347
`}
`
355
348
``
356
``
`-
// Ignore test on x87 floating point, these platforms do not guarantee NaN
`
357
``
`-
// payloads are preserved and flush denormals to zero, failing the tests.
`
358
``
`-
#[cfg(not(target_arch = "x86"))]
`
359
349
`#[test]
`
360
350
`fn test_next_up() {
`
361
351
`let tiny = f32::from_bits(TINY_BITS);
`
`@@ -386,9 +376,6 @@ fn test_next_up() {
`
386
376
`assert_f32_biteq!(nan2.next_up(), nan2);
`
387
377
`}
`
388
378
``
389
``
`-
// Ignore test on x87 floating point, these platforms do not guarantee NaN
`
390
``
`-
// payloads are preserved and flush denormals to zero, failing the tests.
`
391
``
`-
#[cfg(not(target_arch = "x86"))]
`
392
379
`#[test]
`
393
380
`fn test_next_down() {
`
394
381
`let tiny = f32::from_bits(TINY_BITS);
`