Go language provides inbuilt support for basic constants and mathematical functions to perform operations on the numbers with the help of the math package. You are allowed to find the inverse hyperbolic cosine of the specified number with the help of Acosh() function provided by the math package. So, you need to add a math package in your program with the help of the import keyword to access the Acosh() function.
func Acosh(y float64) float64
- If you pass +Inf in this function, then this function will return +Inf.
- If the value y < 1, then this function will return NaN.
- If you pass NaN in this function, then this function will return NaN.
Result 1: 1.0 Result 2: NaN Result 3: NaN Result 4: NaN Result 5: 0.0
0.3 + NaN = NaN