The math.atanh() method returns the inverse hyperbolic tangent of a given number.
Syntax
import math
math.atanh(num)
Parameter
num(required): A number for which the inverse hyperbolic tangent is to be calculated.
The value of num should be between -0.99 and 0.99.
Return Value
Returns a inverse hyperbolic tangent value of the number in the float datatype.
If num is not a number , it returns TypeError.
Visual Representation
Example 1: How to Use math.atanh()
import math
print(math.atanh(0.6))
print(math.atanh(-0.6))
print(math.atanh(0))
Output
0.6931471805599453
-0.6931471805599453
0.0
That’s it!
Ankit Lathiya is a Master of Computer Application by education and Android and Laravel Developer by profession and one of the authors of this blog. He is also expert in JavaScript and Python development.