From ecca58d37e503c8144e04ff19e5560e8e544dac1 Mon Sep 17 00:00:00 2001 From: malezjaa Date: Wed, 18 Mar 2026 18:46:55 +0100 Subject: [PATCH 1/3] use libm for acosh and asinh --- src/shims/math.rs | 8 ++++++++ tests/pass/float.rs | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/shims/math.rs b/src/shims/math.rs index ef185aa2a3..593e4883cc 100644 --- a/src/shims/math.rs +++ b/src/shims/math.rs @@ -30,6 +30,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { | "acosf" | "asinf" | "atanf" + | "acoshf" + | "asinhf" | "log1pf" | "expm1f" | "tgammaf" @@ -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(), @@ -113,6 +117,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { | "acos" | "asin" | "atan" + | "acosh" + | "asinh" | "log1p" | "expm1" | "tgamma" @@ -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(), diff --git a/tests/pass/float.rs b/tests/pass/float.rs index 0b5a71a45e..93f2bbe35a 100644 --- a/tests/pass/float.rs +++ b/tests/pass/float.rs @@ -1607,9 +1607,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()); From 741e3df556ef27e61bb2f6cefb4593851ac379d4 Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Sun, 5 Apr 2026 05:29:21 +0000 Subject: [PATCH 2/3] Prepare for merging from rust-lang/rust This updates the rust-version file to c92036b45babceee1d8d31cac5536207a26369a5. --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index af66f0a4d9..1083529bf3 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -55e86c996809902e8bbad512cfb4d2c18be446d9 +c92036b45babceee1d8d31cac5536207a26369a5 From 64599f189d11794b62524a87cc9f5455660ed507 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 5 Apr 2026 08:22:37 +0200 Subject: [PATCH 3/3] float test: increase ULP tolerance --- tests/pass/float.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/pass/float.rs b/tests/pass/float.rs index 8961693f32..601f1729a4 100644 --- a/tests/pass/float.rs +++ b/tests/pass/float.rs @@ -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); }; }