The cmath.atanh() function returns the inverse hyperbolic tangent of a number. The input number can be complex or real but the returned value is always a complex number.

Syntax:
cmath.atanh(x)
x The value(real or complex) whose inverse hyperbolic tangent we want.

The function returns a complex number representing the angle in radians whose hyperbolic tangent is .

ExampleEdit & Run
import cmath

print(cmath.atanh(0.5))
print(cmath.atanh(-4))
print(cmath.atanh(1 + 2j))
print(cmath.atanh(-2 + 2j))
Output:
(0.5493061443340549+0j) (-0.25541281188299536+1.5707963267948966j) (0.17328679513998632+1.1780972450961724j) (-0.23887786125685911+1.311223269671635j) [Finished in 0.010783747304230928s]