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

Fix signed zero handling in expr.LookupCompare #4861

Merged
merged 3 commits into from
Nov 9, 2023
Merged

Conversation

nwt
Copy link
Member

@nwt nwt commented Nov 6, 2023

LookupCompare fails to account for the fact that a floating-point zero is signed. As a result, a ZNG set containing both negative and positive zero does not have a canonical form. Fix by ordering negative zero before positive zero. The implementation changes the ordering of NaNs whose sign bit is set but that shouldn't matter.

LookupCompare fails to account for the fact that a floating-point zero
is signed.  As a result, a ZNG set containing both negative and positive
zero does not have a canonical form.  Fix by ordering negative zero
before positive zero.  The implementation changes the ordering of NaNs
whose sign bit is set but that shouldn't matter.
@nwt nwt requested a review from a team November 6, 2023 22:07
@nwt nwt mentioned this pull request Nov 6, 2023
@nwt nwt merged commit 78d2ab6 into main Nov 9, 2023
3 checks passed
@nwt nwt deleted the signed-zero-handling branch November 9, 2023 19:04
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

Successfully merging this pull request may close these issues.

2 participants