Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new precision adjustment for i586 rint and exp2f #428

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jan 12, 2025

rint had a couple recent failures from the random tests:

---- mp_random_rint stdout ----
Random Mpfr rint arg 1/1: 10000 iterations (10000 total) using `LIBM_SEED=Fl1f69DaJnwkHN2FeuCXaBFRvJYsPvEY`

thread 'mp_random_rint' panicked at crates/libm-test/tests/multiprecision.rs:41:49:
called `Result::unwrap()` on an `Err` value:
    input:    (-849751480.5001163,) (0xc1c95316dc4003d0,)
    expected: -849751481.0           0xc1c95316dc800000
    actual:   -849751480.0           0xc1c95316dc000000

Caused by:
    ulp 8388608 > 100000

And:

---- mp_random_rint stdout ----
Random Mpfr rint arg 1/1: 10000 iterations (10000 total) using `LIBM_SEED=XN7VCGhX3Wu6Mzn8COvJPITyZlGP7gN7`

thread 'mp_random_rint' panicked at crates/libm-test/tests/multiprecision.rs:41:49:
called `Result::unwrap()` on an `Err` value:
    input:    (-12493089.499809155,) (0xc167d4242ffe6fc5,)
    expected: -12493089.0            0xc167d42420000000
    actual:   -12493090.0            0xc167d42440000000

Caused by:
    ulp 536870912 > 100000

It seems we just implement an incorrect rounding mode. Replace the existing rint override with an xfail if the difference is 0.0 <= ε <= 1.0.


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.

@tgross35 tgross35 enabled auto-merge (rebase) January 12, 2025 04:26
@tgross35 tgross35 force-pushed the i586-precision branch 3 times, most recently from a3f6bc4 to 9bad419 Compare January 12, 2025 07:59
@tgross35 tgross35 changed the title Add a new precision adjustment for i586 Add a new precision adjustment for i586 rint Jan 12, 2025
@tgross35 tgross35 changed the title Add a new precision adjustment for i586 rint Add a new precision adjustment for i586 rint and exp2f Jan 12, 2025
`rint` had a couple recent failures from the random tests:

    ---- mp_random_rint stdout ----
    Random Mpfr rint arg 1/1: 10000 iterations (10000 total) using `LIBM_SEED=Fl1f69DaJnwkHN2FeuCXaBFRvJYsPvEY`

    thread 'mp_random_rint' panicked at crates/libm-test/tests/multiprecision.rs:41:49:
    called `Result::unwrap()` on an `Err` value:
        input:    (-849751480.5001163,) (0xc1c95316dc4003d0,)
        expected: -849751481.0           0xc1c95316dc800000
        actual:   -849751480.0           0xc1c95316dc000000

    Caused by:
        ulp 8388608 > 100000

And:

    ---- mp_random_rint stdout ----
    Random Mpfr rint arg 1/1: 10000 iterations (10000 total) using `LIBM_SEED=XN7VCGhX3Wu6Mzn8COvJPITyZlGP7gN7`

    thread 'mp_random_rint' panicked at crates/libm-test/tests/multiprecision.rs:41:49:
    called `Result::unwrap()` on an `Err` value:
        input:    (-12493089.499809155,) (0xc167d4242ffe6fc5,)
        expected: -12493089.0            0xc167d42420000000
        actual:   -12493090.0            0xc167d42440000000

    Caused by:
        ulp 536870912 > 100000

It seems we just implement an incorrect rounding mode. Replace the
existing `rint` override with an xfail if the difference is 0.0 <= ε <=
1.0.
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.
@tgross35 tgross35 merged commit 6712204 into rust-lang:master Jan 12, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant