Asinh()
Published Sep 6, 2023
Contribute to Docs
The Asinh()
function returns the inverse hyperbolic sine of a number.
Syntax
result := math.Asinh(number)
The Asinh()
function takes one parameter, number
, a type of float64
. It returns a number representing the inverse hyperbolic sine (also known as arcsinh) value of number
as a type of float64
. If the value of number
is:
- Not defined (
undefined
), then it returnsNaN
(Not a Number) - Positive infinity or equivalent, then it returns
+Inf
- Negative infinity or equivalent, then it returns
-Inf
Note: The
math
library must be imported first to use this function.
Example
The following example first calculates the inverse hyperbolic sine of num
and then prints out the result to the console:
package mainimport ("fmt""math")func main() {num := 16.1inverseHyperbolicSine := math.Asinh(num)fmt.Printf("The inverse hyperbolic sine of %f is %f\n", num, inverseHyperbolicSine)}
The output will be:
The inverse hyperbolic sine of 16.100000 is 3.472930
Codebyte Example
The following example is runnable and uses the Asinh()
function with two values: negative infinity and 3.1
.
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Go on Codecademy
- Career path
Computer Science
Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!Includes 6 CoursesWith Professional CertificationBeginner Friendly75 hours - Free course
Learn Go
Learn how to use Go (Golang), an open-source programming language supported by Google!Beginner Friendly6 hours