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

cmp/internal/value: fix handling of negative zero for floats #152

Merged
merged 2 commits into from Aug 5, 2019

Commits on Aug 5, 2019

  1. cmp/internal/value: fix handling of negative zero for floats

    Fix IsZero to properly report false for IsZero(-0.0) since
    we define IsZero as whether it is equal to the zero memory value.
    Add note to isLess that we don't need to handle -0.0 since
    we can't possibly have both keys present in the same map.
    Use sort.SliceStable in SortedKeys for deterministic output since
    it is possible to have both -0.0 and +0.0 from two different maps.
    dsnet committed Aug 5, 2019
    Copy the full SHA
    68cd567 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    cefcd77 View commit details
    Browse the repository at this point in the history