-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
No "weird" floats in const fn {from,to}_bits #95971
Conversation
Careful handling does its best to take care of both Armv7's "unenhanced" Neon as well as the x87 FPU.
Thank you for submitting a new PR for the library teams! If this PR contains a stabilization of a library feature that has not already completed FCP in its tracking issue, introduces new or changes existing unstable library APIs, or changes our public documentation in ways that create new stability guarantees then please comment with |
oof. What you write makes sense, but I have no way of verifying it beyond looking at the CTFE logic and agreeing that it makes sense.
yea, we don't. Our impl is "perfectly IEEE compliant". I am fully aware how useless that fact is, considering hardware and LLVM do what they do. |
That's fine! It's my job to bring those two more into alignment, one way or another. 😈 |
e243780
to
d9318aa
Compare
Fixed up comments and removed unnecessary x87-specific logic for const time. |
This comment has been minimized.
This comment has been minimized.
d9318aa
to
4da8682
Compare
This gets us closer to floats in const fn. I'll address the use of const_eval_select after this is merged. @bors r+ |
📌 Commit 4da8682 has been approved by |
⌛ Testing commit 4da8682 with merge cacaef022ae549251cf088cf0e2cf93abb505675... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry TimeoutError: waiting for selector "#titles" failed: timeout 30000ms |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1e9aa8a): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. |
Should the doc comments of these functions explicitly mention their restrictions when used in |
Probably would be best if they did, yes. |
I suspect this code is subtly incorrect and that we don't even e.g. use x87-style floats in CTFE, so I don't have to guard against that case. A future PR will be hopefully removing them from concern entirely, anyways. But at the moment I wanted to get this rolling because small questions like that one seem best answered by review.
r? @oli-obk
cc @eddyb @thomcc