Asinh()
function is used to find the inverse hyperbolic sine for the given input (x
– parameter) in Go language.
The standard math package of Go programming language has Asinh()
function. The purpose of this function is to find the inverse of hyperbolic sine function.
Syntax of Asinh()
Function in Go Language
The syntax of
Note:
Special cases are:
Asinh()
function in Go Language is:1 | func Asinh(x float64) float64 |
Note:
float64
is a data type in Go language which has IEEE-754 64-bit floating-point numbers.Special cases are:
Asinh(±0) = ±0
Asinh(±Inf) = ±Inf
Asinh(NaN) = NaN
Parameters of Asinh()
Function in Go Language
x
– Where x
is any Valid float64
Input value. This parameter is required.
Error Handling
If the
If there is no argument (
x
parameter is not a number (numeric value) Asinh()
function returns an error
.If there is no argument (
x
– input value) passes to the function, then the compiler will produce an error
.
Return Value of Asinh()
Function in Go Language
Asinh()
function will return the inverse hyperbolic sine of the given input(x
– parameters).
GoLang Asinh()
Function Example 1
1 2 3 4 5 6 7 8 9 10 | package main import "fmt" import "math" func main() { var x float64 x = math.Asinh(56) fmt.Println(x) } |
Output:
4.718578581151767
GoLang Asinh()
Function Example 2
1 2 3 4 5 6 7 8 9 10 | package main import "fmt" import "math" func main() { var x float64 x = math.Asinh(0) fmt.Println(x) } |
Output:
0
GoLang Asinh()
Function Example 3
1 2 3 4 5 6 7 8 9 10 | package main import "fmt" import "math" func main() { var x float64 x = math.Asinh(-8) fmt.Println(x) } |
Output:
-2.7764722807237177