ACOS
A function that calculates the inverse cosine (arc cosine). The result is a number in the interval [0, π].
Syntax
sql
ACOS(expr)Arguments
expr: A real number between -1.0 and +1.0 or an argument of another data type that can be converted to a numeric data type.
Return Value
A DECIMAL value in radians (not degrees) in the range [0, π], corresponding to the arc cosine value of the argument.
Example
sql
SELECT acos(NULL), acos(0), acos('0'), acos(0.7425), acos(0.61), acos(-0.34);+------------+---------+-----------+--------------+------------+-------------+
| ACOS(NULL) | ACOS(0) | ACOS('0') | ACOS(0.7425) | ACOS(0.61) | ACOS(-0.34) |
+------------+---------+-----------+--------------+------------+-------------+
| NULL | 1.57... | 1.57... | 0.73... | 0.91... | 1.91... |
+------------+---------+-----------+--------------+------------+-------------+