TAN
All functions > MATH > TAN
Returns the tangent of an angle in radians.
Signatures
Returns: Tangent value
TAN(radians: T) → DOUBLE sql
| Parameter | Type | Required | Description |
|---|---|---|---|
radians | T | Yes | Angle in radians (DOUBLE) |
Notes
- Input angle must be in radians (use RADIANS() to convert from degrees)
- Definition:
TAN(x) = SIN(x) / COS(x) TAN(0) = 0,TAN(π/4) = 1,TAN(π) = 0- Undefined (infinite) at odd multiples of π/2
- Period of π:
TAN(x) = TAN(x + π) - Odd function:
TAN(-x) = -TAN(x) - Returns NULL if input is NULL
Examples
FeatureQL
SELECT
f1 := TAN(0e0), -- Tangent of 0 radians is 0
f2 := TAN(0.7853981633974483e0), -- Tangent of π/4 radians is ~1
f3 := TAN(0.5235987755982988e0), -- Tangent of π/6 radians
f4 := TAN(-0.7853981633974483e0) -- Odd function: TAN(-π/4) = -TAN(π/4)
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR |
|---|---|---|---|
| 0.0 | 0.9999999999999999 | 0.5773502691896256 | -0.9999999999999999 |
On this page