File tree 1 file changed +2
-3
lines changed
crates/core_simd/src/vector
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -79,15 +79,14 @@ macro_rules! impl_float_vector {
79
79
/// Returns true for each lane if its value is subnormal.
80
80
#[ inline]
81
81
pub fn is_subnormal( self ) -> crate :: $mask_ty<LANES > {
82
- let exponent_mask = crate :: $bits_ty:: splat( !0 << <$type>:: MANTISSA_DIGITS ) ;
83
- self . abs( ) . lanes_ne( Self :: splat( 0.0 ) ) & ( self . to_bits( ) & exponent_mask) . lanes_eq( crate :: $bits_ty:: splat( 0 ) )
82
+ self . abs( ) . lanes_ne( Self :: splat( 0.0 ) ) & ( self . to_bits( ) & Self :: splat( <$type>:: INFINITY ) . to_bits( ) ) . lanes_eq( crate :: $bits_ty:: splat( 0 ) )
84
83
}
85
84
86
85
/// Returns true for each lane if its value is neither neither zero, infinite,
87
86
/// subnormal, or `NaN`.
88
87
#[ inline]
89
88
pub fn is_normal( self ) -> crate :: $mask_ty<LANES > {
90
- !( self . abs( ) . lanes_eq( Self :: splat( 0.0 ) ) | self . is_nan( ) | self . is_subnormal( ) )
89
+ !( self . abs( ) . lanes_eq( Self :: splat( 0.0 ) ) | self . is_nan( ) | self . is_subnormal( ) | self . is_infinite ( ) )
91
90
}
92
91
}
93
92
} ;
You can’t perform that action at this time.
0 commit comments