PostgreSQL atan() Function
The PostgreSQL atan() function returns the arctangent of a specified number in radians.
atan() Syntax
This is the syntax of the PostgreSQL atan() function:
atan(number)
Parameters
number-
Required. The number used to calculate the arctangent.
Return value
The PostgreSQL atan() function returns the arctangent of a specified number in radians.
If the parameter number is NULL, the atan() function will return NULL.
atan() Examples
Here are a few examples of the atan() function:
SELECT
atan(-2) AS "atan(-2)",
atan(-1) AS "atan(-1)",
atan(-0.5) AS "atan(-0.5)",
atan(-0.2) AS "atan(-0.2)",
atan(0) AS "atan(0)",
atan(0.2) AS "atan(0.2)",
atan(0.5) AS "atan(0.5)",
atan(1) AS "atan(1)",
atan(2) AS "atan(2)";
-[ RECORD 1 ]--------------------
atan(-2) | -1.1071487177940904
atan(-1) | -0.7853981633974483
atan(-0.5) | -0.4636476090008061
atan(-0.2) | -0.19739555984988078
atan(0) | 0
atan(0.2) | 0.19739555984988078
atan(0.5) | 0.4636476090008061
atan(1) | 0.7853981633974483
atan(2) | 1.1071487177940904