Back to Symbolic Math (SymEngine)
sym.tanh
Computes the hyperbolic tangent of a symbolic expression.
Syntax
sym.tanh(x)
Description
Computes the hyperbolic tangent of a symbolic expression. The hyperbolic tangent is defined as tanh(x) = sinh(x)/cosh(x) = (e^x - e^(-x))/(e^x + e^(-x)). It is a sigmoid-like function bounded between -1 and 1.
Parameters
| Name | Description |
|---|---|
| x | - The argument (as a symbolic expression). |
Returns
Expr