Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 94fc25e

Browse files
committed
Update allowed precision to account for new tests
1 parent 8537abb commit 94fc25e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

crates/libm-test/src/precision.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ pub fn default_ulp(ctx: &CheckCtx) -> u32 {
4141
(Musl, Id::Tgamma) => 20,
4242

4343
// Overrides for MPFR
44+
(Mpfr, Id::Acosh) => 4,
4445
(Mpfr, Id::Acoshf) => 4,
4546
(Mpfr, Id::Asinh | Id::Asinhf) => 2,
4647
(Mpfr, Id::Atanh | Id::Atanhf) => 2,
47-
(Mpfr, Id::Exp10 | Id::Exp10f) => 3,
48+
(Mpfr, Id::Exp10 | Id::Exp10f) => 6,
4849
(Mpfr, Id::Lgamma | Id::LgammaR | Id::Lgammaf | Id::LgammafR) => 16,
4950
(Mpfr, Id::Sinh | Id::Sinhf) => 2,
5051
(Mpfr, Id::Tanh | Id::Tanhf) => 2,
@@ -105,17 +106,15 @@ impl MaybeOverride<(f32,)> for SpecialCase {
105106
_ulp: &mut u32,
106107
ctx: &CheckCtx,
107108
) -> Option<TestResult> {
108-
if ctx.basis == CheckBasis::Musl {
109-
if ctx.fn_name == "expm1f" && input.0 > 80.0 && actual.is_infinite() {
110-
// we return infinity but the number is representable
111-
return XFAIL;
112-
}
109+
if ctx.fn_name == "expm1f" && input.0 > 80.0 && actual.is_infinite() {
110+
// we return infinity but the number is representable
111+
return XFAIL;
112+
}
113113

114-
if ctx.fn_name == "sinhf" && input.0.abs() > 80.0 && actual.is_nan() {
115-
// we return some NaN that should be real values or infinite
116-
// doesn't seem to happen on x86
117-
return XFAIL;
118-
}
114+
if ctx.fn_name == "sinhf" && input.0.abs() > 80.0 && actual.is_nan() {
115+
// we return some NaN that should be real values or infinite
116+
// doesn't seem to happen on x86
117+
return XFAIL;
119118
}
120119

121120
if ctx.fn_name == "acoshf" && input.0 < -1.0 {

0 commit comments

Comments
 (0)