Skip to content

Commit ef86862

Browse files
committed
Auto merge of #139396 - Zalathar:rollup-lmoqvru, r=Zalathar
Rollup of 11 pull requests Successful merges: - #136457 (Expose algebraic floating point intrinsics) - #137880 (Autodiff batching) - #137897 (fix pthread-based tls on apple targets) - #138024 (Allow optimizing out `panic_bounds_check` in Unicode checks.) - #138546 (Add integer to string formatting tests) - #138826 (StableMIR: Add `associated_items`.) - #138950 (replace extra_filename with strict version hash in metrics file names) - #139274 (Rustdoc: typecheck settings.js) - #139285 (use lower case to match other error messages) - #139341 (Apply `Recovery::Forbidden` when reparsing pasted macro fragments.) - #139389 (make `Arguments::as_statically_known_str` doc(hidden)) r? `@ghost` `@rustbot` modify labels: rollup
2 parents e5b1927 + 2190168 commit ef86862

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/intrinsics/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)