Go Sinh()

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

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

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • Learn how to use Go (Golang), an open-source programming language supported by Google!
    • Beginner Friendly.
      6 hours

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.

Code
Output

All contributors

Contribute to Docs

Learn Go on Codecademy

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • Learn how to use Go (Golang), an open-source programming language supported by Google!
    • Beginner Friendly.
      6 hours