File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -411,9 +411,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
411411 } ;
412412 let res = this. binary_op ( op, & a, & b) ?;
413413 // `binary_op` already called `generate_nan` if needed.
414- // Apply a relative error of 16ULP to simulate non-deterministic precision loss
414+ // Apply a relative error of 4ULP to simulate non-deterministic precision loss
415415 // due to optimizations.
416- let res = apply_random_float_error_to_imm ( this, res, 4 /* log2(16 ) */ ) ?;
416+ let res = apply_random_float_error_to_imm ( this, res, 2 /* log2(4 ) */ ) ?;
417417 this. write_immediate ( * res, dest) ?;
418418 }
419419
@@ -464,9 +464,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
464464 if !float_finite ( & res) ? {
465465 throw_ub_format ! ( "`{intrinsic_name}` intrinsic produced non-finite value as result" ) ;
466466 }
467- // Apply a relative error of 16ULP to simulate non-deterministic precision loss
467+ // Apply a relative error of 4ULP to simulate non-deterministic precision loss
468468 // due to optimizations.
469- let res = apply_random_float_error_to_imm ( this, res, 4 /* log2(16 ) */ ) ?;
469+ let res = apply_random_float_error_to_imm ( this, res, 2 /* log2(4 ) */ ) ?;
470470 this. write_immediate ( * res, dest) ?;
471471 }
472472
You can’t perform that action at this time.
0 commit comments