TAN
All functions > MATH > TAN
Returns the tangent of an angle in radians.
Syntax
TAN(radians: T) → DOUBLE
sql
Type Parameters:
T
: Any numeric type (TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, DECIMAL)
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
radians | T | Yes | Angle in radians (DOUBLE) |
Returns
DOUBLE - Tangent value
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