Categories:

Numeric functions (Trigonometric)

ACOS¶

Computes the inverse cosine (arc cosine) of its input; the result is a number in the interval [0, pi].

Syntax¶

ACOS( <input_expr> )
Copy

Arguments¶

input_expr

The value or expression to operate on. Must be greater than or equal to -1.0 and less than or equal to +1.0. The data type must be FLOAT or DECFLOAT.

Returns¶

If the input expression is of type DECFLOAT, the returned type is DECFLOAT. Otherwise, the returned type is FLOAT.

Returns the arc cosine in radians (not degrees) as a value in the range [0, pi].

Examples¶

SELECT ACOS(0), ACOS(0.5), ACOS(1);
+-------------+-------------+---------+
|     ACOS(0) |   ACOS(0.5) | ACOS(1) |
|-------------+-------------+---------|
| 1.570796327 | 1.047197551 |       0 |
+-------------+-------------+---------+
Copy