PostgreSQL asin() Function
The PostgreSQL asin() function returns the arc sine of the specified number in radians.
asin() Syntax
This is the syntax of the PostgreSQL asin() function:
asin(number)
Parameters
number-
Required. The number used to calculate the arcsine. It should be between -1 and 1, inclusive.
Return value
The PostgreSQL asin() function returns the arc sine of the specified number in radians.
If the argument is number not between -1 and 1, the asin() function will throw an error.
If the parameter number is NULL, the asin() function will return NULL.
asin() Examples
Here are a few examples of the asin() function:
SELECT
asin(-1) AS "asin(-1)",
asin(-0.5) AS "asin(-0.5)",
asin(-0.2) AS "asin(-0.2)",
asin(0) AS "asin(0)",
asin(0.2) AS "asin(0.2)",
asin(0.5) AS "asin(0.5)",
asin(1) AS "asin(1)";
-[ RECORD 1 ]-------------------
asin(-1) | -1.5707963267948966
asin(-0.5) | -0.5235987755982989
asin(-0.2) | -0.2013579207903308
asin(0) | 0
asin(0.2) | 0.2013579207903308
asin(0.5) | 0.5235987755982989
asin(1) | 1.5707963267948966