Trigonometric function that calculates the tangent of a specific value in radians.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|
<value> | The value that determines the returned tangent in radians. | DOUBLE PRECISION |
Return Type
TAN returns a value of type DOUBLE PRECISION.
Example
The following query calculates the tangent of 1.57 radians. 1.57 is approximately pi/2:
SELECT TAN(1.57) as result;
| result double |
|---|
| 1255.7655915007897 |
Rows: 1Execution time: 6.98ms
The following query calculates the tangent of pi:
SELECT ROUND(TAN(PI()), 5) as result;
Rows: 1Execution time: 4.68ms