TAN()

All functions > MATH > TAN()

Returns the tangent of an angle in radians.

Signatures

Tangent

Returns: Tangent value

TAN(radians: T) → DOUBLE
sql
ParameterTypeRequiredDescription
radiansTYesAngle 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 VARCHARf2 VARCHARf3 VARCHARf4 VARCHAR
0.00.99999999999999990.5773502691896256-0.9999999999999999

Last update at: 2026/05/26 17:22:09