Python math.atanh() Method
Python math.atanh(x)Returns the inverse hyperbolic tangent of x.
The argument of math.atanh(x) is between -0.99 and 0.99.Python Version: 2.6
Syntax
The syntax of the math.atanh() method is as follows:
math.atanh(x)
Parameter Description:
- x-- Required, a positive or negative number between -0.99 and 0.99. If x is not a number, returns TypeError.
Return Value
Returns a float representing the inverse hyperbolic tangent of x.
Example
The following example returns the hyperbolic tangent of a number:
Example
# Import math package
import math
# Output hyperbolic tangent value
print(math.atanh(0.59))
print(math.atanh(-0.12))
import math
# Output hyperbolic tangent value
print(math.atanh(0.59))
print(math.atanh(-0.12))
Output result:
0.6776660677579618 -0.12058102840844402Other Extensions
Python math Module