Javascript - Math atanh() Method

The atanh() method returns the hyperbolic arctangent of a number.

Description

The atanh() method returns the hyperbolic arctangent of a number.

If the parameter x is greater than 1, or less than -1, the method will return NaN.

If the parameter x is 1, the method will return Infinity.

If the parameter x is -1, the method will return -Infinity.

Syntax

Math.atanh(x)

Parameter Values

Parameter RequireDescription
x Required. A number

Return

A Number, or NaN, or Infinity, or -Infinity

Example

Return the hyperbolic arctangent of a specified number:

Demo

//display the hyperbolic arctangent of 0.5
console.log(Math.atanh(0.5));

Result