I've been digging in 'sort' package of standard Go library, studying concrete implementations of used sorting algorithms and one thing seems really strange to me - definition of Float64 Less() function:
func (x Float64Slice) Less(i, j int) bool { return x[i] < x[j] || (isNaN(x[i]) && !isNaN(x[j])) }
I quite confident, that floating-point values (in IEEE 754 semantics, at least) MUST NOT be compared directly. Why the comparison implemented this way is in standard Go lib?