acos
The acos function is used to return the arccosine of the given numeric value a.
Syntax
acos(DOUBLE a)
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| a | Yes | DOUBLE, BIGINT, DECIMAL, or STRING | The value range of parameter a is [-1,1]. The format of a includes floating-point format, integer format, and string format. If parameter a is not of type DOUBLE, it is implicitly converted to DOUBLE type before evaluation. |
Return Values
Returns a value of type DOUBLE, in the range of 0 to π.
- If the value of a is not within the range [-1, 1], NaN is returned.
- If a is NULL, NULL is returned.
Example Code
Returns 3.141592653589793.
select acos(-1);
Returns 0.
select acos(1);
Returns NULL.
select acos(null);
Returns NaN.
select acos(10);
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot