GoLang – Find Inverse Hyperbolic – Atanh() Function – Examples & Explanation

Atanh() function is used to find the inverse hyperbolic tangent for the given input (x – parameter) in Go language.
The standard math package of Go programming language has Atanh() function. The purpose of this function is to find the inverse of the hyperbolic tangent function.

Syntax of Atanh() Function in Go Language

The syntax of Atanh() function in Go Language is:

Note: float64 is a data type in Go language which has IEEE-754 64-bit floating-point numbers.
Special cases are:
Atanh(1) = +Inf
Atanh(±0) = ±0
Atanh(-1) = -Inf
Atanh(x) = NaN if x < -1 or x > 1
Atanh(NaN) = NaN


Parameters of Atanh() Function in Go Language

x – Where x is any Valid float64 Input value. This parameter is required.


Error Handling

If the x parameter is not a number (numeric value) Atanh() 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 Atanh() Function in Go Language

Atanh() function will returns the inverse hyperbolic tangent of the given input(x – parameter).


GoLang Atanh() Function Example 1



GoLang Atanh() Function Example 2



GoLang Atanh() Function Example 3