Python math.atanh() Method

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

Visual Representation of Python math.atanh() Method

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!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.