diff options
Diffstat (limited to 'src/pkg/math/nextafter.go')
-rw-r--r-- | src/pkg/math/nextafter.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/math/nextafter.go b/src/pkg/math/nextafter.go index b57d3e715..86114340c 100644 --- a/src/pkg/math/nextafter.go +++ b/src/pkg/math/nextafter.go @@ -11,8 +11,10 @@ package math // Nextafter(NaN, y) = NaN // Nextafter(x, NaN) = NaN func Nextafter(x, y float64) (r float64) { + // TODO(rsc): Remove manual inlining of IsNaN + // when compiler does it for us switch { - case IsNaN(x) || IsNaN(y): // special case + case x != x || y != y: // IsNaN(x) || IsNaN(y): // special case r = NaN() case x == y: r = x |