Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sort: fixed bug in (Float64Slice) Less; NaN less than anything else
Previously comparisons with NaN led to contradictory results if it was compared to anything not NaN, since Less always returned false, thus breaking monotonicity of ordering. This fix makes NaN less than anything else and adds NaN and (+-)Inf to testcases. Fixes #2092. R=golang-dev, r, rsc, r CC=golang-dev https://golang.org/cl/4805051
- Loading branch information
Showing
2 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters