go/src/pkg/sort
Florian Uekermann 480ef72c23 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
2011-07-23 15:47:06 -04:00
..
Makefile sort: binary search for sorted slices 2010-11-10 13:19:28 -08:00
search.go go/printer: changed max. number of newlines from 3 to 2 2011-07-14 14:39:40 -07:00
search_test.go sort: remove testing cycle 2011-07-22 21:17:46 -04:00
sort.go sort: fixed bug in (Float64Slice) Less; NaN less than anything else 2011-07-23 15:47:06 -04:00
sort_test.go sort: fixed bug in (Float64Slice) Less; NaN less than anything else 2011-07-23 15:47:06 -04:00