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
| Parameter | Type | Required | Description |
|---|---|---|---|
radians | T | Yes | Angle 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 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR |
|---|---|---|---|
| 0.0 | 1.0 | 0.7071067811865475 | 0.49999999999999994 |
On this page