Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

python
python3
math
communitycreator

What is math.atanh() in Python?

Hassan Ahmed

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The in-built atanh() function from the math module in Python is used to return the inverse hyperbolic tangent of a number in radians.

Figure 1 shows the mathematical representation of the atanh() function.

Figure 1: Logarithmic representation of inverse hyperbolic tangent function

Syntax

math.atanh(x)

Parameter

This function requires a positive or negative number between -0.99 and 0.99.

Return value

atanh(x) returns a float value that is the inverse hyperbolic tangent of the number sent as a parameter.

Example

import math
#Parameter as a positive number
print ("The value of atanh(0.3) is:", math.atanh(0.3))
#Parameter as a negative number
print ("The value of atanh(-0.9) is:", math.atanh(-0.9))

RELATED TAGS

python
python3
math
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring