-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
MIR is double-rounding f32 literals #32805
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
Comments
arielb1
added
A-amusing
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
labels
Apr 7, 2016
Amusing indeed! |
This is because of |
Yes, fixing this requires adding a |
bors
added a commit
that referenced
this issue
Jun 6, 2016
[MIR] Fix double-rounding of float constants and ignore NaN sign in tests. Fixes #32805 by handling f32 and f64 separately in rustc_const_eval. Also removes `#[rustc_no_mir]` from a couple libstd tests by ignoring NaN sign. Turns out that runtime evaluation of `0.0 / 0.0` produces a NaN with the sign bit set, whereas LLVM constant folds it to a NaN with the sign bit unset, which we were testing for.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
STR
Expected Result
Both MIR and old trans should use a single rounding, that's it
Actual Result
old trans is single-rounding as it should, but MIR is doing a double rounding:
The text was updated successfully, but these errors were encountered: