VeloDB Cloud
SQL Manual
Functions
math-functions
acos

acos

Description

Syntax:

DOUBLE acos(DOUBLE x)

This function returns the arccosine of x. If x is beyond the range of [-1, 1], it will return nan .

Example

mysql> select acos(1);
+-----------+
| acos(1.0) |
+-----------+
|         0 |
+-----------+
mysql> select acos(0);
+--------------------+
| acos(0.0)          |
+--------------------+
| 1.5707963267948966 |
+--------------------+
mysql> select acos(-2);
+------------+
| acos(-2.0) |
+------------+
|        nan |
+------------+

Keywords

ACOS