summaryrefslogtreecommitdiff
path: root/libgo/go/math/sinh.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/math/sinh.go')
-rw-r--r--libgo/go/math/sinh.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/libgo/go/math/sinh.go b/libgo/go/math/sinh.go
index eaf28a51cd6..139b911fe65 100644
--- a/libgo/go/math/sinh.go
+++ b/libgo/go/math/sinh.go
@@ -17,6 +17,11 @@ package math
*/
// Sinh returns the hyperbolic sine of x.
+//
+// Special cases are:
+// Sinh(±0) = ±0
+// Sinh(±Inf) = ±Inf
+// Sinh(NaN) = NaN
func Sinh(x float64) float64 {
// The coefficients are #2029 from Hart & Cheney. (20.36D)
const (
@@ -56,6 +61,11 @@ func Sinh(x float64) float64 {
}
// Cosh returns the hyperbolic cosine of x.
+//
+// Special cases are:
+// Cosh(±0) = 1
+// Cosh(±Inf) = +Inf
+// Cosh(NaN) = NaN
func Cosh(x float64) float64 {
if x < 0 {
x = -x