TAN()
All functions > MATH > TAN()
Returns the tangent of an angle in radians.
Signatures
Tangent
Returns: Tangent value
TAN(radians: T) → DOUBLE sql
| Parameter | Type | Required | Description |
|---|---|---|---|
radians | T | Yes | Angle in radians |
With:
T: Floating-point type (FLOAT, DOUBLE)
Signature notes:
- Input must be in radians; use RADIANS() to convert from degrees
- Undefined at odd multiples of π/2; engines typically return very large values
- Period of π; odd function:
TAN(-x) = -TAN(x) - Returns NULL if the input is NULL
Examples
FeatureQL
SELECT
f1 := TAN(0E0), -- tan(0) = 0
f2 := TAN(0.7853981633974483E0), -- tan(π/4) ≈ 1
f3 := TAN(0.5235987755982988E0), -- tan(π/6)
f4 := TAN(-0.7853981633974483E0) -- Odd function
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR |
|---|---|---|---|
| 0.0 | 0.9999999999999999 | 0.5773502691896256 | -0.9999999999999999 |
On this page