Python math.atanh() – Arc / Inverse Hyperbolic Tangent

Contents

Python math.atanh()

math.atanh(x) function returns the hyperbolic tangent of x.

atanh(x) = 0.5*log( (1 + x) / (1 – x) )

Syntax

The syntax to call atanh() function is

math.atanh(x)

where

ParameterRequiredDescription
xYesA numeric value. The valid range of x is (-1, 1).

If x is not a valid value for atanh() function, then the function raises ValueError.

Examples

In the following example, we find the inverse hyperbolic tangent of 0.5, using atanh() function of math module.

Python Program

import math

x = 0.5
result = math.atanh(x)
print('atanh(x) :', result)
Run Code Copy

Output

atanh(x) : 0.5493061443340549

Summary

In this Python Examples tutorial, we learned the syntax of, and examples for math.atanh() function.

Related Tutorials

Code copied to clipboard successfully 👍