acos()
returns the arccosine of a number in radians. arccosine function is the inverse of the cosine function. Arccosine of a number is also known as the cosine inverse of the number.
Syntax: acos(expression)
Returns: A Float.
Arguments
Name | Description |
expression | A numeric expression that represents the angle in radians. |
Example
RETURN acos(0.5)
The value returned will be the arccosine of 0.5 radians, which is 1.0471975511965979.
Considerations
acos(null)
returnsnull
.- If (
expression
< -1), then (acos(expression)
) returnsNan
(Not a Number). - If (
expression
> 1), then (acos(expression)
) returnsNan
(Not a Number).
Example
RETURN acos(0.1)
Returns the following Result
acos(0.1) |
1.4706289056333368 |
Example
RETURN acos(0.8)
Returns the following Result
acos(0.8) |
0.6435011087932843 |
Example
RETURN acos(-0.4)
Returns the following Result
acos(-0.4) |
1.9823131728623846 |
Example
RETURN acos(1)
Returns the following Result
acos(1) |
0.0 |
Example
RETURN acos(-1)
Returns the following Result
acos(-1) |
3.141592653589793 |
Example
RETURN acos(0)
Returns the following Result
acos(0) |
1.5707963267948966 |
Example
RETURN acos(1.5)
Returns the following Result
acos(1.5) |
NaN |
Note– acos(<Any Number greater than 1>)
returns NaN
.
Example
RETURN acos(-1.5)
Returns the following Result
acos(-1.5) |
NaN |
Note– acos(<Any Number less than -1>)
returns NaN
.
Example
RETURN acos(null)
Returns the following Result
acos(null) |
null |
Note– acos(null)
returns null
.