PostgreSQL sin() Function
The PostgreSQL sin() function returns the sine of the specified radian.
sin() Syntax
This is the syntax of the PostgreSQL sin() function:
sin(number)
Parameters
number-
Required. The number used to calculate the sine, in radians.
Return value
The PostgreSQL sin() function returns the sine of the specified radian.
If the parameter number is NULL, the sin() function will return NULL.
sin() Examples
Here are a few examples for the sin() function:
SELECT
sin(2.5) AS "sin(2.5)",
sin(0.2) AS "sin(0.2)",
sin(-0.5) AS "sin(-0.5)",
sin(-0.2) AS "sin(-0.2)",
sin(0) AS "sin(0)",
sin(pi()) AS "sin(pi())";
-[ RECORD 1 ]---------------------
sin(2.5) | 0.5984721441039564
sin(0.2) | 0.19866933079506122
sin(-0.5) | -0.479425538604203
sin(-0.2) | -0.19866933079506122
sin(0) | 0
sin(pi()) | 1.2246467991473532e-16