PostgreSQL atan() 函数使用指南

PostgreSQL atan() 函数以弧度为单位返回指定数值的反正切。

atan() 语法

这里是 PostgreSQL atan() 函数的语法:

atan(number)

参数

number
必需的。 一个用于计算反正切的数值。

返回值

PostgreSQL atan() 函数以弧度为单位返回指定数值的反正切。

如果参数 numberNULLatan() 函数将会返回 NULL

atan() 示例

这里有几个 atan() 函数的示例。

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