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 {
23872387
23882388 #[ cfg( any( feature = "std" , feature = "libm" ) ) ]
23892389 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( ) ) ;
23912393 assert ! ( lower_than_min. is_subnormal( ) ) ;
23922394 }
23932395
23942396 #[ test]
23952397 #[ cfg( any( feature = "std" , feature = "libm" ) ) ]
23962398 fn subnormal ( ) {
23972399 test_subnormal :: < f64 > ( ) ;
2398- }
2399-
2400- #[ test]
2401- #[ should_panic]
2402- #[ cfg( any( feature = "std" , feature = "libm" ) ) ]
2403- fn subnormal_f32 ( ) {
24042400 test_subnormal :: < f32 > ( ) ;
24052401 }
24062402}
You can’t perform that action at this time.
0 commit comments