tanh

Syntax

tanh(X)

Details

The hyperbolic tangent function.

Note:
DolphinDB's tanh function accepts only one argument and supports calculations on scalars, vectors, and matrices. By contrast, NumPy's tanh function is a generalized ufunc that supports N-dimensional arrays of any shape. You can control the output and apply conditional computation through parameters such as out and where.

Parameters

X is a scalar/vector/matrix.

Returns

DOUBLE type with the same data form as X.

Examples

tanh(0 1 2);
// output: [0,0.761594,0.964028]