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

fixdfti test fails if float generation gets fixed #162

Closed
est31 opened this issue May 7, 2017 · 2 comments
Closed

fixdfti test fails if float generation gets fixed #162

est31 opened this issue May 7, 2017 · 2 comments

Comments

@est31
Copy link
Member

est31 commented May 7, 2017

In build.rs, there is code to use the random generator to create floats.

It has a little bug though in the way it determines the exponent. The exponent is first &ed with the mask, and then shifted. The issue is though, the mask is already assuming a shifted value. So we end up with the expression always being 0.

Instead it should be first shifted, and then &ed with the mask, like ((exponent << (SIGNIFICAND_BITS -1)) & EXPONENT_MASK) |.

When doing this though, I discovered that the fixdfti test fails. I first thought it was a conversion my PR added, but its in fact already present.

The error looks like:

thread 'fixdfti' panicked at 'assertion failed: `(left == right)` (left: `((5179139571476070400,), -170141183460469231731687303715884105728)`, right: `((5179139571476070400,), 170141183460469231731687303715884105727)`)'
@est31
Copy link
Member Author

est31 commented May 7, 2017

This might be related to rust-lang/rust#10184

@AaronKutch
Copy link
Contributor

This has been fixed by #397

@Amanieu Amanieu closed this as completed Apr 3, 2021
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

No branches or pull requests

3 participants