Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ecca58d
use libm for acosh and asinh
malezjaa Mar 18, 2026
b1f0c58
Rollup merge of #149868 - alexcrichton:wasm-no-allow-undefined, r=Mar…
JonathanBrouwer Apr 4, 2026
050db8a
Rollup merge of #153555 - asder8215:rwlock_docs, r=Mark-Simulacrum
JonathanBrouwer Apr 4, 2026
b6f8bac
Rollup merge of #152851 - fortanix:jb/fix-sgx-non-ip-addr, r=Mark-Sim…
JonathanBrouwer Apr 4, 2026
7af361f
Rollup merge of #154051 - malezjaa:approximations-acosh-and-asinh, r=…
JonathanBrouwer Apr 4, 2026
d4bd1fa
Rollup merge of #154581 - GrigorenkoPV:extract-if-debug, r=Mark-Simul…
JonathanBrouwer Apr 4, 2026
535124a
Rollup merge of #154461 - lms0806:issue_154452, r=Mark-Simulacrum
JonathanBrouwer Apr 4, 2026
10ae81b
Rollup merge of #154526 - asder8215:no_threads_read_overflow, r=Mark-…
JonathanBrouwer Apr 4, 2026
cd4c391
Rollup merge of #154798 - notriddle:sub-word-path-match, r=GuillaumeG…
JonathanBrouwer Apr 4, 2026
8164cfe
Auto merge of #154815 - JonathanBrouwer:rollup-sdqRx2J, r=JonathanBro…
bors Apr 4, 2026
f318a5a
Rollup merge of #147552 - Walnut356:cleanup, r=Mark-Simulacrum
JonathanBrouwer Apr 4, 2026
75f6ad7
Rollup merge of #154052 - cdown:cdown/2026-03-19/precision, r=Mark-Si…
JonathanBrouwer Apr 4, 2026
4a71a75
Rollup merge of #154706 - hermit-os:time-hermit, r=Mark-Simulacrum
JonathanBrouwer Apr 4, 2026
178d16e
Rollup merge of #154707 - nik-contrib:substr-new-range, r=Mark-Simula…
JonathanBrouwer Apr 4, 2026
1e5074f
Auto merge of #154824 - JonathanBrouwer:rollup-neQUhVI, r=JonathanBro…
bors Apr 4, 2026
f994df2
Rollup merge of #150129 - a1phyr:improve_buf_api, r=joshtriplett
JonathanBrouwer Apr 4, 2026
91cafe8
Rollup merge of #154830 - RalfJung:miri, r=RalfJung
JonathanBrouwer Apr 4, 2026
a4b2f0c
Auto merge of #154832 - JonathanBrouwer:rollup-xJmqF28, r=JonathanBro…
bors Apr 5, 2026
741e3df
Prepare for merging from rust-lang/rust
Apr 5, 2026
a3801b1
Merge ref 'c92036b45bab' from rust-lang/rust
Apr 5, 2026
64599f1
float test: increase ULP tolerance
RalfJung Apr 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
55e86c996809902e8bbad512cfb4d2c18be446d9
c92036b45babceee1d8d31cac5536207a26369a5
8 changes: 8 additions & 0 deletions src/shims/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
| "acosf"
| "asinf"
| "atanf"
| "acoshf"
| "asinhf"
| "log1pf"
| "expm1f"
| "tgammaf"
Expand All @@ -52,6 +54,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
"acosf" => f_host.acos(),
"asinf" => f_host.asin(),
"atanf" => f_host.atan(),
"acoshf" => f_host.acosh(),
"asinhf" => f_host.asinh(),
"log1pf" => f_host.ln_1p(),
"expm1f" => f_host.exp_m1(),
"tgammaf" => f_host.gamma(),
Expand Down Expand Up @@ -113,6 +117,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
| "acos"
| "asin"
| "atan"
| "acosh"
| "asinh"
| "log1p"
| "expm1"
| "tgamma"
Expand All @@ -135,6 +141,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
"acos" => f_host.acos(),
"asin" => f_host.asin(),
"atan" => f_host.atan(),
"acosh" => f_host.acosh(),
"asinh" => f_host.asinh(),
"log1p" => f_host.ln_1p(),
"expm1" => f_host.exp_m1(),
"tgamma" => f_host.gamma(),
Expand Down
9 changes: 5 additions & 4 deletions tests/pass/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ macro_rules! assert_approx_eq {
}};

($a:expr, $b: expr) => {
// accept up to 8ULP (4ULP for host floats and 4ULP for miri artificial error).
assert_approx_eq!($a, $b, 8);
// Accept up to 12ULP (4ULP for miri artificial error and the rest for host floats).
// We saw failures on an i686-linux host with a limit of 8!
assert_approx_eq!($a, $b, 12);
};
}

Expand Down Expand Up @@ -1611,9 +1612,9 @@ fn test_non_determinism() {
check_nondet(|| 1.0f32.sinh());
check_nondet(|| 1.0f32.cosh());
check_nondet(|| 1.0f32.tanh());
check_nondet(|| 1.0f32.asinh());
check_nondet(|| 2.0f32.acosh());
}
check_nondet(|| 1.0f32.asinh());
check_nondet(|| 2.0f32.acosh());
check_nondet(|| 0.5f32.atanh());
check_nondet(|| 5.0f32.gamma());
check_nondet(|| 5.0f32.ln_gamma());
Expand Down