diff options
Diffstat (limited to 'src/pkg/math/tanh.go')
-rw-r--r-- | src/pkg/math/tanh.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/math/tanh.go b/src/pkg/math/tanh.go index f4a8a5a4d..03a641b4d 100644 --- a/src/pkg/math/tanh.go +++ b/src/pkg/math/tanh.go @@ -12,6 +12,11 @@ package math */ // Tanh computes the hyperbolic tangent of x. +// +// Special cases are: +// Tanh(±0) = ±0 +// Tanh(±Inf) = ±1 +// Tanh(NaN) = NaN func Tanh(x float64) float64 { if x < 0 { x = -x |