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

Commit 6712204

Browse files
committed
Add a new precision adjustment for i586 exp2f
There was a recent failure from the random tests: ---- mp_random_exp2f stdout ---- Random Mpfr exp2f arg 1/1: 10000 iterations (10000 total) using `LIBM_SEED=fqgMuzs6eqH1VZSEmQpLnThnaIyRUOWe` thread 'mp_random_exp2f' panicked at crates/libm-test/tests/multiprecision.rs:41:49: called `Result::unwrap()` on an `Err` value: input: (127.97238,) (0x42fff1dc,) expected: 3.3383009e38 0x7f7b2556 actual: inf 0x7f800000 Caused by: mismatched infinities Add an xfail for mismatched infinities on i586.
1 parent d56c3aa commit 6712204

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crates/libm-test/src/precision.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,15 @@ impl MaybeOverride<(f32,)> for SpecialCase {
211211
return XFAIL;
212212
}
213213

214+
if cfg!(x86_no_sse)
215+
&& ctx.base_name == BaseName::Exp2
216+
&& !expected.is_infinite()
217+
&& actual.is_infinite()
218+
{
219+
// We return infinity when there is a representable value. Test input: 127.97238
220+
return XFAIL;
221+
}
222+
214223
maybe_check_nan_bits(actual, expected, ctx)
215224
}
216225

0 commit comments

Comments
 (0)