tan

Syntax

tan(X)

Details

The tangent function.

Note:
DolphinDB's tan function accepts only one argument and supports calculations on scalars, vectors, and matrices. By contrast, NumPy's tan 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

tan(0 1 2);
// output: [0,1.557408,-2.185040]

Related functions: asin, acos, atan, sin, cos.