Skip to content
Branch: master
Commits on Aug 5, 2019
  1. cmp/internal/value: fix handling of negative zero for floats (#152)

    dsnet committed Aug 5, 2019
    * 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.
    The zero key from the left left map will be taken over the right map.
You can’t perform that action at this time.