diff options
Diffstat (limited to 'src/pkg/math/expm1.go')
-rw-r--r-- | src/pkg/math/expm1.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pkg/math/expm1.go b/src/pkg/math/expm1.go index 15fc25f13..8f56e15cc 100644 --- a/src/pkg/math/expm1.go +++ b/src/pkg/math/expm1.go @@ -142,12 +142,10 @@ func expm1(x float64) float64 { ) // special cases - // TODO(rsc): Remove manual inlining of IsNaN, IsInf - // when compiler does it for us switch { - case x > MaxFloat64 || x != x: // IsInf(x, 1) || IsNaN(x): + case IsInf(x, 1) || IsNaN(x): return x - case x < -MaxFloat64: // IsInf(x, -1): + case IsInf(x, -1): return -1 } |