MathLib.tanh()

MathLib.tanh() calculates the hyperbolic tangent of a number. \[ \text{MathLib.tanh}(x) = \tanh(x) \]

Specification

MathLib.tanh accepts one argument. Any additional arguments will be ignored. The type of the argument should be number. For other argument types see the unary function specification.
  1. MathLib.tanh(NaN) = NaN
  2. MathLib.tanh(+0) = +0
  3. MathLib.tanh(-0) = -0
  4. MathLib.tanh(+∞) = 1
  5. MathLib.tanh(-∞) = -1
  6. otherwise MathLib.tanh(x) = hyperbolic tangent of x

Tests

Categories: unary Function