Skip to content

Spurious floattidf failures on mips #168

New issue

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

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

Already on GitHub? # to your account

Closed
alexcrichton opened this issue Jun 25, 2017 · 3 comments
Closed

Spurious floattidf failures on mips #168

alexcrichton opened this issue Jun 25, 2017 · 3 comments

Comments

@alexcrichton
Copy link
Member

This was coming up every so often on #166 so wanted to jot this down before I forgot.

---- floattidf stdout ----

	thread 'floattidf' panicked at 'assertion failed: `(left == right)`

  left: `((-56294995342131100,), 14335762557005848176, 14335762557005848160, true)`,

 right: `((-56294995342131100,), 14335762557005848176, 14335762557005848160, false)`', /target/mips-unknown-linux-gnu/debug/build/compiler_builtins-7252d96c089bca74/out/floattidf.rs:10055
@est31
Copy link
Member

est31 commented Jun 25, 2017

Yup, I've got this in #161 as well, but lacked the discipline to open an issue :)

@mattico
Copy link
Contributor

mattico commented Jun 25, 2017

Here's the test:

static TEST_CASES: &[((i128,), u64)] = &[ /*...*/ ];

#[test]
fn floattidf() {
    for &((a,), b) in TEST_CASES {
        let b_ = __floattidf(a);
        let g_b = to_u64(b_);
        let diff = if g_b > b { g_b - b } else { b - g_b };
        assert_eq!(((a,), b, g_b, true), ((a,), b, g_b, diff <= 1));
    }
}

@AaronKutch
Copy link
Contributor

This has been fixed by #397

@Amanieu Amanieu closed this as completed Apr 3, 2021
tgross35 pushed a commit to tgross35/compiler-builtins that referenced this issue Feb 23, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants