Compute the sine of an angle supplied in degrees, returning exact values at common angles.
SIND(degrees)
## Overview Returns the sine of an angle expressed in degrees. SIND avoids the explicit RADIANS() conversion that SIN requires and is implemented to return mathematically exact values at the angles where sine takes a simple closed-form value (0, 90, 180, 270, and so on). The main advantage over SIN(RADIANS(x)) is that SIND(180) is exactly 0, while SIN(RADIANS(180)) returns about 1.2e-16. For all other inputs, SIND is functionally identical to SIN(RADIANS(x)): inputs are implicitly cast to DOUBLE, the mathematical sine is evaluated, and the result is a DOUBLE in [-1, 1]. ## Behavior - Accepts any numeric type implicitly castable to DOUBLE. - Returns a DOUBLE in [-1, 1]. - Returns NULL if the argument is NULL. - Returns exact values at integer multiples of 90 degrees: SIND(0) = 0, SIND(90) = 1, SIND(180) = 0, SIND(270) = -1. - Preserves the anti-symmetric property: SIND(-x) = -SIND(x). ## Numeric precision - For multiples of 90 degrees, SIND returns the mathematically exact value without floating-point residue. - For other angles, precision matches SIN(RADIANS(x)) plus the rounding in RADIANS conversion (typically one ULP). - For very large degree magnitudes, argument reduction loses precision. ## Compatibility - Matches the PostgreSQL SIND scalar function. - Complements SIN (radian input) and SIND (degree input) in dialects that offer both.
| Name | Type | Description |
|---|---|---|
degrees | Specifies the angle in degrees. Accepts any numeric type implicitly castable to DOUBLE. Negative and beyond-360 values are valid; the conversion is a pure sine of the equivalent radian angle with special-case exact handling for integer multiples of 90 degrees. |
-- Basic literal
SELECT SIND(0); -- 0.0
-- Exact at 90 degrees
SELECT SIND(90); -- 1.0
-- Common angle
SELECT SIND(30); -- 0.5
-- Exact at 180 degrees (zero, not tiny residue)
SELECT SIND(180); -- 0.0
-- Anti-symmetry: SIND(-x) = -SIND(x)
SELECT SIND(-90); -- -1.0
-- NULL propagation
SELECT SIND(NULL); -- NULL