SIN

All functions > MATH > SIN

Returns the sine of an angle in radians.

Signatures

Returns: Sine value (between -1 and 1)

SIN(radians: T) → DOUBLE
sql
ParameterTypeRequiredDescription
radiansTYesAngle in radians (DOUBLE)

Notes

  • Input angle must be in radians (use RADIANS() to convert from degrees)
  • Returns values in the range [-1, 1]
  • SIN(0) = 0, SIN(π/2) = 1, SIN(π) = 0, SIN(3π/2) = -1
  • Period of 2π: SIN(x) = SIN(x + 2π)
  • Odd function: SIN(-x) = -SIN(x)
  • Returns NULL if input is NULL

Examples

FeatureQL
SELECT
    f1 := SIN(0e0),  -- Sine of 0 radians is 0
    f2 := SIN(1.5707963267948966e0),  -- Sine of π/2 radians is 1
    f3 := SIN(0.7853981633974483e0),  -- Sine of π/4 radians
    f4 := SIN(0.5235987755982988e0)  -- Sine of π/6 radians is ~0.5
;
Result
f1 VARCHARf2 VARCHARf3 VARCHARf4 VARCHAR
0.01.00.70710678118654750.49999999999999994

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19