The atanh() method returns the hyperbolic arctangent of a number.
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.
Math.atanh(x)
Parameter | Require | Description |
---|---|---|
x | Required. | A number |
A Number, or NaN, or Infinity, or -Infinity
Return the hyperbolic arctangent of a specified number:
//display the hyperbolic arctangent of 0.5
console.log(Math.atanh(0.5));