The in-built atanh()
function from the math
module in Python is used to return the inverse hyperbolic tangent of a number in radians.
Figure 1 shows the mathematical representation of the atanh()
function.
math.atanh(x)
This function requires a positive or negative number
between -0.99 and 0.99.
atanh(x)
returns a float
value that is the inverse hyperbolic tangent of the number sent as a parameter.
import math#Parameter as a positive numberprint ("The value of atanh(0.3) is:", math.atanh(0.3))#Parameter as a negative numberprint ("The value of atanh(-0.9) is:", math.atanh(-0.9))