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
Showing
Please register or sign in to comment