summaryrefslogtreecommitdiff
path: root/src/pkg/math/asinh.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/math/asinh.go')
-rw-r--r--src/pkg/math/asinh.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/pkg/math/asinh.go b/src/pkg/math/asinh.go
index c1cad563c..0defbb9be 100644
--- a/src/pkg/math/asinh.go
+++ b/src/pkg/math/asinh.go
@@ -33,8 +33,8 @@ package math
// Asinh(x) calculates the inverse hyperbolic sine of x.
//
// Special cases are:
-// Asinh(+Inf) = +Inf
-// Asinh(-Inf) = -Inf
+// Asinh(±0) = ±0
+// Asinh(±Inf) = ±Inf
// Asinh(NaN) = NaN
func Asinh(x float64) float64 {
const (
@@ -42,10 +42,8 @@ func Asinh(x float64) float64 {
NearZero = 1.0 / (1 << 28) // 2**-28
Large = 1 << 28 // 2**28
)
- // TODO(rsc): Remove manual inlining of IsNaN, IsInf
- // when compiler does it for us
// special cases
- if x != x || x > MaxFloat64 || x < -MaxFloat64 { // IsNaN(x) || IsInf(x, 0)
+ if IsNaN(x) || IsInf(x, 0) {
return x
}
sign := false