@@ -2456,6 +2456,7 @@ mod tests {
2456
2456
for sign in [ 1 , -1 ] {
2457
2457
let sign_f = sign as f32 ;
2458
2458
test_integer_decode ( sign_f * 0.0__f32 , ( 0x000000 , -150 , sign) ) ;
2459
+ test_integer_decode ( sign_f * 1.0e-40_f32 , ( 0x8116c2 , -150 , sign) ) ; // subnormal (between 0 and MIN_POSITIVE)
2459
2460
test_integer_decode ( sign_f * f32:: MIN_POSITIVE , ( 0x800000 , -149 , sign) ) ;
2460
2461
test_integer_decode ( sign_f * 0.25_f32 , ( 0x800000 , -25 , sign) ) ;
2461
2462
test_integer_decode ( sign_f * 0.5__f32 , ( 0x800000 , -24 , sign) ) ;
@@ -2478,6 +2479,7 @@ mod tests {
2478
2479
for sign in [ 1 , -1 ] {
2479
2480
let sign_f = sign as f64 ;
2480
2481
test_integer_decode ( sign_f * 0.0__f64 , ( 0x00000000000000 , -1075 , sign) ) ;
2482
+ test_integer_decode ( sign_f * 1.0e-308_f64 , ( 0x1730d67819e8d2 , -1075 , sign) ) ; // subnormal (between 0 and MIN_POSITIVE)
2481
2483
test_integer_decode ( sign_f * f64:: MIN_POSITIVE , ( 0x10000000000000 , -1074 , sign) ) ;
2482
2484
test_integer_decode ( sign_f * 0.25_f64 , ( 0x10000000000000 , -54 , sign) ) ;
2483
2485
test_integer_decode ( sign_f * 0.5__f64 , ( 0x10000000000000 , -53 , sign) ) ;
0 commit comments