Parameter | Type | Description |
---|---|---|
NUMBER | VALUE(FLOAT) | The input value. |
VALUE(FLOAT) | The tangent of the input value. |
This function takes a numeric value and returns the trigonometric tangent of it. The input value is assumed to be in radians. The input value is interpreted as a floating-point number.
a = tan(0); // a = 0.0
a = tan(pi() / 2); // a = 1.6E16
a = tan(pi()); // a = -1.2E-16
a = tan(3 * pi() / 2); // a = 5.4E15
a = tan(2 * pi()); // a = -2.4E-16
The return value of this function relies on TAME's implementation of Tangent, which may be slightly different between implementations.
Due to rounding issues, you may be better off epsilon-rounding the return value, as some results that should be 0 may be nonzero, but very small.