# JavaScript Math.atanh() Function

The Javascript Math.atanh() function is an inbuilt function in JavaScript that is used to get the hyperbolic arctangent of a number. The hyperbolic arctangent is known by many names such as hyperbolic inverse tangent and atanh. It is the inverse of the hyperbolic tangent function i.e, The inverse hyperbolic tangent of any value says x is the value y for which the hyperbolic tangent of y is x.

if y = atanh(x)
then x = tanh(y)

We have,

Syntax:

Math.atanh(x)

Parameters:

• x: Here x is a number whose hyperbolic arctangent is going to be calculated.

Return Value: It returns the hyperbolic arc-tangent of the given number.

Note: Here 2nd column contains int values which are the version of the corresponding browser.

Examples:

Input: Math.atanh(-1)
Output: -Infinity

Explanation: Here output 0 is the hyperbolic arc-sine of a number 1.

Input: Math.atanh(0)
Output: 0
Input: Math.atanh(0.5)
Output: 0.5493061443340548
Input: Math.atanh(1)
Output: Infinity
Input: Math.atanh(1.2)
Output: NaN
Input: Math.atanh(-2.2)
Output: NaN

For values greater than 1 or less than -1, NaN i.e, not a number is returned.

Example: Let’s see the JavaScripts program.

## JavaScript

 

Output:

0
0.5493061443340548
Infinity
NaN
NaN

Example: Whenever we need to get a get hyperbolic arc-tangent of a number that time we can take the help of the Math.atanh() function in JavaScript.

## JavaScript

 

Output:

0.10033534773107558
NaN

We have a complete list of Javascript Math Objects methods, to check those please go through this Javascript Math Object Complete reference article.

Previous
Next