@@ -765,13 +765,15 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
765765 "erfcf" => f_host. erfc ( ) ,
766766 _ => bug ! ( ) ,
767767 } ;
768+ let res = res. to_soft ( ) ;
768769 // Apply a relative error of 16ULP to introduce some non-determinism
769770 // simulating imprecise implementations and optimizations.
770- let res = math:: apply_random_float_error_ulp (
771- this,
772- res. to_soft ( ) ,
773- 4 , // log2(16)
774- ) ;
771+ // FIXME: temporarily disabled as it breaks std tests.
772+ // let res = math::apply_random_float_error_ulp(
773+ // this,
774+ // res,
775+ // 4, // log2(16)
776+ // );
775777 let res = this. adjust_nan ( res, & [ f] ) ;
776778 this. write_scalar ( res, dest) ?;
777779 }
@@ -796,11 +798,12 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
796798 } ;
797799 // Apply a relative error of 16ULP to introduce some non-determinism
798800 // simulating imprecise implementations and optimizations.
799- let res = math:: apply_random_float_error_ulp (
800- this,
801- res,
802- 4 , // log2(16)
803- ) ;
801+ // FIXME: temporarily disabled as it breaks std tests.
802+ // let res = math::apply_random_float_error_ulp(
803+ // this,
804+ // res,
805+ // 4, // log2(16)
806+ // );
804807 let res = this. adjust_nan ( res, & [ f1, f2] ) ;
805808 this. write_scalar ( res, dest) ?;
806809 }
@@ -839,13 +842,15 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
839842 "erfc" => f_host. erfc ( ) ,
840843 _ => bug ! ( ) ,
841844 } ;
845+ let res = res. to_soft ( ) ;
842846 // Apply a relative error of 16ULP to introduce some non-determinism
843847 // simulating imprecise implementations and optimizations.
844- let res = math:: apply_random_float_error_ulp (
845- this,
846- res. to_soft ( ) ,
847- 4 , // log2(16)
848- ) ;
848+ // FIXME: temporarily disabled as it breaks std tests.
849+ // let res = math::apply_random_float_error_ulp(
850+ // this,
851+ // res.to_soft(),
852+ // 4, // log2(16)
853+ // );
849854 let res = this. adjust_nan ( res, & [ f] ) ;
850855 this. write_scalar ( res, dest) ?;
851856 }
@@ -870,11 +875,12 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
870875 } ;
871876 // Apply a relative error of 16ULP to introduce some non-determinism
872877 // simulating imprecise implementations and optimizations.
873- let res = math:: apply_random_float_error_ulp (
874- this,
875- res,
876- 4 , // log2(16)
877- ) ;
878+ // FIXME: temporarily disabled as it breaks std tests.
879+ // let res = math::apply_random_float_error_ulp(
880+ // this,
881+ // res,
882+ // 4, // log2(16)
883+ // );
878884 let res = this. adjust_nan ( res, & [ f1, f2] ) ;
879885 this. write_scalar ( res, dest) ?;
880886 }
@@ -900,10 +906,11 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
900906 // Using host floats (but it's fine, these operations do not have guaranteed precision).
901907 let ( res, sign) = x. to_host ( ) . ln_gamma ( ) ;
902908 this. write_int ( sign, & signp) ?;
909+ let res = res. to_soft ( ) ;
903910 // Apply a relative error of 16ULP to introduce some non-determinism
904911 // simulating imprecise implementations and optimizations.
905- let res =
906- math:: apply_random_float_error_ulp ( this, res. to_soft ( ) , 4 /* log2(16) */ ) ;
912+ // FIXME: temporarily disabled as it breaks std tests.
913+ // let res = math::apply_random_float_error_ulp(this, res, 4 /* log2(16) */);
907914 let res = this. adjust_nan ( res, & [ x] ) ;
908915 this. write_scalar ( res, dest) ?;
909916 }
@@ -915,10 +922,11 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
915922 // Using host floats (but it's fine, these operations do not have guaranteed precision).
916923 let ( res, sign) = x. to_host ( ) . ln_gamma ( ) ;
917924 this. write_int ( sign, & signp) ?;
925+ let res = res. to_soft ( ) ;
918926 // Apply a relative error of 16ULP to introduce some non-determinism
919927 // simulating imprecise implementations and optimizations.
920- let res =
921- math:: apply_random_float_error_ulp ( this, res. to_soft ( ) , 4 /* log2(16) */ ) ;
928+ // FIXME: temporarily disabled as it breaks std tests.
929+ // let res = math::apply_random_float_error_ulp(this, res, 4 /* log2(16) */);
922930 let res = this. adjust_nan ( res, & [ x] ) ;
923931 this. write_scalar ( res, dest) ?;
924932 }
0 commit comments