VeloDB Cloud
SQL Reference
SQL Functions
Scalar Functions
Numeric Functions
ACOS

ACOS

Description

Returns the arc cosine of x, or NULL if x is not in the range -1 to 1.

Syntax

ACOS(<x>)

Parameters

ParameterDescription
<x>The value for which the acos value is to be calculated

Return Value

The acos value of parameter x.

Example

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