File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -2387,20 +2387,16 @@ mod tests {
2387
2387
2388
2388
#[ cfg( any( feature = "std" , feature = "libm" ) ) ]
2389
2389
fn test_subnormal < F : crate :: float:: Float + :: core:: fmt:: Debug > ( ) {
2390
- let lower_than_min: F = F :: from ( 1.0e-308_f64 ) . unwrap ( ) ;
2390
+ let min_positive = F :: min_positive_value ( ) ;
2391
+ let lower_than_min = min_positive / F :: from ( 2.0f32 ) . unwrap ( ) ;
2392
+ assert ! ( !min_positive. is_subnormal( ) ) ;
2391
2393
assert ! ( lower_than_min. is_subnormal( ) ) ;
2392
2394
}
2393
2395
2394
2396
#[ test]
2395
2397
#[ cfg( any( feature = "std" , feature = "libm" ) ) ]
2396
2398
fn subnormal ( ) {
2397
2399
test_subnormal :: < f64 > ( ) ;
2398
- }
2399
-
2400
- #[ test]
2401
- #[ should_panic]
2402
- #[ cfg( any( feature = "std" , feature = "libm" ) ) ]
2403
- fn subnormal_f32 ( ) {
2404
2400
test_subnormal :: < f32 > ( ) ;
2405
2401
}
2406
2402
}
You can’t perform that action at this time.
0 commit comments