Atanh()
DanielLarrazabal1 total contribution
Published Oct 21, 2023
Contribute to Docs
The Atanh()
function takes a float64 argument representing the angle whose inverse hyperbolic tangent value is to be returned. It returns this inverse hyperbolic tangent as a float64 value that can range from negative infinity to positive infinity.
Syntax
result := math.Atanh(x)
Where x
represents the angle whose inverse hyperbolic tangent value is to be returned, and result
is the inverse hyperbolic tangent of x
. Some special exceptions include:
Atanh(-1)
equals-Inf
Atanh(1)
equals+Inf
Example
The following code calculates the arctangent and prints out the result:
package mainimport ("fmt""math")func main() {fmt.Println(math.Atanh(0.5))fmt.Println(math.Atanh(math.NaN()))}
The output will be:
0.5493061443340548NaN
Looking to contribute?
- 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.