-
Notifications
You must be signed in to change notification settings - Fork 213
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
The USE_NATIVE_FULL_ITERATIONS
codepath in div64
is broken
#555
Comments
Yeah, the float division implementation is pretty fragile. The proposed fix would make Do you have a usecase where you want to tweak this? I am refactoring this as part of #622, but don'tr really plan to expose this configuration (instead it will use full iterations only if |
I don't. I just found this bug because I essentially forked this code to run in a |
Oh, that is an interesting idea. In theory all of these should be usable for expansion at comptime, but the use of traits probably makes it pretty hard to use directly in actual
|
The implementation changed recently, selecting the iteration count is done at compiler-builtins/src/float/div.rs Lines 507 to 529 in bb18ce5
|
It looks like this codepath is completely broken. If enabled like this:
it fails with an overflow:
Looking at this code and looking at the
div32
implementation I'm guessing this is how it should be fixed?The text was updated successfully, but these errors were encountered: