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

Commit c93054b

Browse files
committed
Update precision based on new test results
1 parent addbb18 commit c93054b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

crates/libm-test/src/precision.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,22 @@ pub fn default_ulp(ctx: &CheckCtx) -> u32 {
9090
Bn::Exp10 if usize::BITS < 64 => ulp = 4,
9191
Bn::Lgamma | Bn::LgammaR => ulp = 400,
9292
Bn::Tanh => ulp = 4,
93-
_ if ctx.fn_ident == Id::Sincosf => ulp = 500,
94-
_ if ctx.fn_ident == Id::Tgamma => ulp = 20,
93+
_ => (),
94+
}
95+
96+
match ctx.fn_ident {
97+
Id::Jnf | Id::Ynf => ulp = 4000,
98+
Id::Sincosf => ulp = 500,
99+
Id::Tgamma => ulp = 20,
95100
_ => (),
96101
}
97102
}
98103

99104
// In some cases, our implementation is less accurate than musl on i586.
100105
if cfg!(x86_no_sse) {
101106
match ctx.fn_ident {
107+
Id::Asinh => ulp = 3,
108+
Id::Asinhf => ulp = 3,
102109
Id::Log1p | Id::Log1pf => ulp = 2,
103110
Id::Round => ulp = 1,
104111
Id::Tan => ulp = 2,

0 commit comments

Comments
 (0)