acos
Computes the arc cosine of an argument.
Syntaxβ
DOUBLE acos(DOUBLE arg)
Parametersβ
arg
: You can specify only a numeric value. This function converts the numeric value into a DOUBLE value before it computes the arc cosine of the value.
Return valueβ
Returns a value of the DOUBLE data type.
Usage notesβ
If you specify a non-numeric value, this function returns NULL
.
Examplesβ
mysql> select acos(-1);
+-------------------+
| acos(-1) |
+-------------------+
| 3.141592653589793 |
+-------------------+
mysql> select acos(0);
+--------------------+
| acos(0) |
+--------------------+
| 1.5707963267948966 |
+--------------------+
mysql> select acos(1);
+---------+
| acos(1) |
+---------+
| 0 |
+---------+
mysql> select acos("");
+----------+
| acos('') |
+----------+
| NULL |
+----------+
keywordβ
ACOS