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.
This commit is contained in:
Trevor Gross
2025-01-12 08:02:44 +00:00
committed by Trevor Gross
parent 228c716a43
commit b50ea809ff

View File

@@ -211,6 +211,15 @@ impl MaybeOverride<(f32,)> for SpecialCase {
return XFAIL; return XFAIL;
} }
if cfg!(x86_no_sse)
&& ctx.base_name == BaseName::Exp2
&& !expected.is_infinite()
&& actual.is_infinite()
{
// We return infinity when there is a representable value. Test input: 127.97238
return XFAIL;
}
maybe_check_nan_bits(actual, expected, ctx) maybe_check_nan_bits(actual, expected, ctx)
} }