Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

ASIN Function

ASIN is a trigonometric function that returns the arc sine of a number. The return value is in radians and is between PI/2 and -PI/2.

Syntax

Copy
ASIN(number)

Argument

number

The input parameter is a double precision number.

Return Type

The ASIN function returns a double precision number.

Examples

The following example returns the arc sine of 1 and multiples it by 2:

Copy
select asin(1)*2 as pi; pi ------------------ 3.14159265358979 (1 row)

The following example converts the arc sine of .5 to the equivalent number of degrees:

Copy
select (asin(.5) * 180/(select pi())) as degrees; degrees --------- 30 (1 row)