summaryrefslogtreecommitdiff
path: root/src/pkg/math/log1p.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/math/log1p.go')
-rw-r--r--src/pkg/math/log1p.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pkg/math/log1p.go b/src/pkg/math/log1p.go
index dee7f2b64..12b98684c 100644
--- a/src/pkg/math/log1p.go
+++ b/src/pkg/math/log1p.go
@@ -113,14 +113,12 @@ func log1p(x float64) float64 {
)
// special cases
- // TODO(rsc): Remove manual inlining of IsNaN, IsInf
- // when compiler does it for us
switch {
- case x < -1 || x != x: // x < -1 || IsNaN(x): // includes -Inf
+ case x < -1 || IsNaN(x): // includes -Inf
return NaN()
case x == -1:
return Inf(-1)
- case x > MaxFloat64: // IsInf(x, 1):
+ case IsInf(x, 1):
return Inf(1)
}