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

Commit 186f864

Browse files
committed
Set the allowed FMA ULP to 0
It is currently getting the default of 1 or 2. Since this operation should always be infinite precision, no deviation is allowed.
1 parent c0e0827 commit 186f864

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/libm-test/src/precision.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const MP_DEFAULT_ULP: u32 = 1;
2424
pub fn default_ulp(ctx: &CheckCtx) -> u32 {
2525
match (&ctx.basis, ctx.fn_ident) {
2626
// Overrides that apply to either basis
27+
// FMA is expected to be infinite precision.
28+
(_, Id::Fma | Id::Fmaf) => 0,
2729
(_, Id::J0 | Id::J0f | Id::J1 | Id::J1f) => {
2830
// Results seem very target-dependent
2931
if cfg!(target_arch = "x86_64") { 4000 } else { 800_000 }

0 commit comments

Comments
 (0)