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

ATAN Function

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

Syntax

Copy
ATAN(number)

Argument

number

The input parameter is a double precision number.

Return Type

The ATAN function returns a double precision number.

Examples

The following example returns the arc tangent of 1 and multiplies it by 4:

Copy
select atan(1) * 4 as pi; pi ------------------ 3.14159265358979 (1 row)

The following example converts the arc tangent of 1 to the equivalent number of degrees:

Copy
select (atan(1) * 180/(select pi())) as degrees; degrees --------- 45 (1 row)