SIN function calculates the sine of an input argument.
In math, given the ABC triangle, the sine of an angle (A) is defined as the ratio between the length of the side that is opposite that angle (a) (which is not the hypotenuse) to the length of the hypotenuse (h):
sin A = a / h
For the inverse of the
SIN function, see the
The following illustrates the syntax of the
SIN function accepts a
numeric_expression that represents the angle in radians for which the sine is calculated.
SIN function returns a floating-point number.
The following statement returns the sine values of π,/2 and π/6.
SELECT SIN(PI()/2) sin_half_pi,
sin_half_pi | sin_one_sixth_pi
1 | 0.5
Note that we use the
PI function to get the π constant.
Most database systems support the
SIN function with the same behavior.