File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
crates/core_simd/src/vector Expand file tree Collapse file tree 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 {
7979 /// Returns true for each lane if its value is subnormal.
8080 #[ inline]
8181 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 ) )
8483 }
8584
8685 /// Returns true for each lane if its value is neither neither zero, infinite,
8786 /// subnormal, or `NaN`.
8887 #[ inline]
8988 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 ( ) )
9190 }
9291 }
9392 } ;
You can’t perform that action at this time.
0 commit comments