Skip to content

tanh

Hyperbolic tangent.

Y = tanh(X)

Returns sinh(X) / cosh(X) — bounded between -1 and +1. Common as a smooth saturation function in neural networks.

tanh(0) % 0
  • tan — Tangent (radians).
  • sinh — Hyperbolic sine.
  • cosh — Hyperbolic cosine.
  • atanh — Inverse hyperbolic tangent.