tanh

tanh(a: number) 🡒 number, pure function

Returns the hyperbolic tangent of X, given by:

$$\tanh(x) = \frac{e^x - e^{-x}} {e^x + e^{-x} }$$

Example:

x = 4.2
y = tanh(x)
show scalar "" with y

See also