Sinh()

Anonymous contributor's avatar
Anonymous contributor
Anonymous contributor's avatar
Anonymous contributor
Published Sep 22, 2023
Contribute to Docs

The Sinh() function returns the hyperbolic sine of a number.

Syntax

result := math.Sinh(value)

Where result is the hyperbolic sine value of value, returned as a float.

Example

The following calculates the hyperbolic sine of a value and prints out the result:

package main
import (
"fmt"
"math"
)
func main() {
value := 1.0
hyperbolicSine := math.Sinh(value)
fmt.Printf("%.2f\n", hyperbolicSine)
}

The output will be:

1.18

Codebyte Example

The following example is runnable and shows how the Sinh() function handles infinite values.

us
Visit us
code
Hide code
Code
Output
Hide output
Hide output
Loading...

All contributors

Looking to contribute?

Learn Go on Codecademy