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 comparisons and behavior of is_sign_positive #4

Merged
merged 3 commits into from
Jan 13, 2018

Conversation

tspiteri
Copy link
Contributor

@tspiteri tspiteri commented Jan 6, 2018

This PR has three commits:

  1. Small optimization on is_nan and is_infinite that saves one comparison in each.
  2. Fix comparisons of +0 to -0 and comparisons involving negative numbers. Fixes comparison of +0 and -0 gives wrong result #2.
  3. Update behavior of is_sign_positive and is_sign_negative to match the update behavior of the standard library. Fixes NaN behaviour of is_sign_positive and is_sign_negative is not like for primitive types #3.

@starkat99
Copy link
Owner

I'd been meaning to fix up some of this for a while now, so thanks a bunch for this!

@starkat99 starkat99 merged commit 0238e76 into starkat99:master Jan 13, 2018
@tspiteri tspiteri deleted the fixes branch January 13, 2018 07:29
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