ACOS¶
The ACOS function is used to calculate the arccosine (inverse cosine) of a number. It takes a single numeric argument, which should be a float value in the range of -1 to 1, and returns the arccosine of that number in radians.
Syntax¶
value: A numeric expression for which the arccosine is to be calculated. The value should be in the range of -1 to 1.
Examples¶
Let's consider a table named SingleItem with the following schema:
Insert a row into the SingleItem table:
Example 1: Using ACOS with float values¶
Result:
Example 2: Using ACOS with NULL values¶
Result:
Errors¶
The ACOS function requires a numeric value in the range of -1 to 1 as its argument. Using non-numeric values or more than one argument will result in an error.
Example 3: Using ACOS with non-numeric values¶
Error: Function requires a numeric value.
Example 4: Using ACOS with multiple arguments¶
Error: Function expects 1 argument, but 2 were provided.