summaryrefslogtreecommitdiff
path: root/src/pkg/math/nextafter.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-02-29 11:23:13 +0100
committerOndřej Surý <ondrej@sury.org>2012-02-29 11:23:13 +0100
commitb6d7097a0d6072199f2cd74d67404890697cf78a (patch)
treea2193c528a79fd5606507568859ee5067c6b86e4 /src/pkg/math/nextafter.go
parent4cecda6c347bd6902b960c6a35a967add7070b0d (diff)
downloadgolang-b6d7097a0d6072199f2cd74d67404890697cf78a.tar.gz
Imported Upstream version 2012.02.22upstream-weekly/2012.02.22
Diffstat (limited to 'src/pkg/math/nextafter.go')
-rw-r--r--src/pkg/math/nextafter.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pkg/math/nextafter.go b/src/pkg/math/nextafter.go
index e7723baac..7c4b5bcdf 100644
--- a/src/pkg/math/nextafter.go
+++ b/src/pkg/math/nextafter.go
@@ -11,10 +11,8 @@ 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 x != x || y != y: // IsNaN(x) || IsNaN(y): // special case
+ case IsNaN(x) || IsNaN(y): // special case
r = NaN()
case x == y:
r = x