@@ -558,48 +558,5 @@ impl MaybeOverride<(f64, i32)> for SpecialCase {}
558558#[ cfg( f128_enabled) ]
559559impl MaybeOverride < ( f128 , i32 ) > for SpecialCase { }
560560
561- impl MaybeOverride < ( f32 , f32 , f32 ) > for SpecialCase {
562- fn check_float < F : Float > (
563- input : ( f32 , f32 , f32 ) ,
564- actual : F ,
565- expected : F ,
566- ctx : & CheckCtx ,
567- ) -> CheckAction {
568- ternop_common ( input, actual, expected, ctx)
569- }
570- }
571- impl MaybeOverride < ( f64 , f64 , f64 ) > for SpecialCase {
572- fn check_float < F : Float > (
573- input : ( f64 , f64 , f64 ) ,
574- actual : F ,
575- expected : F ,
576- ctx : & CheckCtx ,
577- ) -> CheckAction {
578- ternop_common ( input, actual, expected, ctx)
579- }
580- }
581-
582- // F1 and F2 are always the same type, this is just to please generics
583- fn ternop_common < F1 : Float , F2 : Float > (
584- input : ( F1 , F1 , F1 ) ,
585- actual : F2 ,
586- expected : F2 ,
587- ctx : & CheckCtx ,
588- ) -> CheckAction {
589- // FIXME(fma): 754-2020 says "When the exact result of (a × b) + c is non-zero yet the result
590- // of fusedMultiplyAdd is zero because of rounding, the zero result takes the sign of the
591- // exact result". Our implementation returns the wrong sign:
592- // fma(5e-324, -5e-324, 0.0) = 0.0 (should be -0.0)
593- if ctx. base_name == BaseName :: Fma
594- && ( input. 0 . is_sign_negative ( ) ^ input. 1 . is_sign_negative ( ) )
595- && input. 0 != F1 :: ZERO
596- && input. 1 != F1 :: ZERO
597- && input. 2 . biteq ( F1 :: ZERO )
598- && expected. biteq ( F2 :: NEG_ZERO )
599- && actual. biteq ( F2 :: ZERO )
600- {
601- return XFAIL ( "fma sign" ) ;
602- }
603-
604- DEFAULT
605- }
561+ impl MaybeOverride < ( f32 , f32 , f32 ) > for SpecialCase { }
562+ impl MaybeOverride < ( f64 , f64 , f64 ) > for SpecialCase { }
0 commit comments