ACOS

The ACOS function returns the arc cosine of a specified number.

Syntax

ACOS ( number )

number

A  DOUBLE PRECISION number that specifies the cosine, in radians, of the angle that you want.

Results

The data type of the returned value is a  DOUBLE PRECISION number. The returned value, in radians, is in the range of zero (0) to pi.

  • If the specified number is NULL, the result of this function is NULL.
  • If the absolute value of the specified number is greater than 1, an exception is returned that indicates that the value is out of range (SQL state 22003).

Example

splice> VALUES ACOS(0.5);
1
----------
1.0471975511965979

1 row selected

See Also