diff --git a/rust-version b/rust-version index af66f0a4d9..1083529bf3 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -55e86c996809902e8bbad512cfb4d2c18be446d9 +c92036b45babceee1d8d31cac5536207a26369a5 diff --git a/src/shims/math.rs b/src/shims/math.rs index 1da7fbbdac..479e129579 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 e5454905bb..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); }; } @@ -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());