-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
[INTERP] Fix fpu_round #1030
[INTERP] Fix fpu_round #1030
Conversation
I'm pretty sure |
Ah, it does! Let me change all of 'em then. |
Ok, done. |
Tests are not happy with this changes |
Seems 0.5 in |
Mmm no, cvtps2pd 0.5 should still be 0.5. Value should not be round to integer at all on cvtps2pd, as it's just packed float to packet double. |
Sorry I mean the cvtps2dq, these names confuses me :'( |
Ah, it actually "Round to Nearest, ties to Even", so 0.5 is expected to round to 0. |
@ptitSeb seems working; also tested test22 with |
Ok, we don't want to set the rounding mode at each function call and not letting it reset to it's previous value The rounding mode might needed to be tracked (might need to actually wrap |
@ptitSeb I pushed some commits to take care of library wrapping, please review again. |
The
nearbyint
functions round their argument to an integer value in floating-point format, using the current rounding direction, therefore it's not "ROUND_Nearest". We should useround
.