math.atanh() function

The math.atanh() function returns the inverse hyperbolic tangent of x.

*Output data type: Float*

  1. import "math"
  2. math.atanh(x: 0.22)
  3. // Returns 0.22365610902183242

Parameters

x

The value used in the operation. x should be greater than -1 and less than 1. Otherwise, the operation will return NaN.

*Data type: Float*

Special cases

  1. math.atanh(x: 1) // Returns +Inf
  2. math.atanh(x: ±0) // Returns ±0
  3. math.atanh(x: -1) // Returns -Inf
  4. math.atanh(x: <-1) // Returns NaN
  5. math.atanh(x: >1) // Returns NaN
  6. math.atanh(x: NaN) // Returns NaN