SQLite acos() Function
The SQLite acos()
function returns the arc cosine of the specified number.
Syntax
Here is the syntax of the SQLite acos()
function:
acos(number)
Parameters
number
-
Required. A number used to calculate the arc cosine.
Return value
The SQLite acos()
function returns the arc cosine of the specified number.
If the parameter is number
not between -1
to 1
, the acos()
function will return NULL
.
If the parameter number
is NULL
, the acos()
function will return NULL
.
Examples
This example shows the basic usage of the SQLite acos()
function:
SELECT
acos(0.5),
acos(0.2),
acos(-0.5),
acos(-0.2),
acos(1),
acos(0),
acos(-1),
acos(2),
acos(-2);
acos(0.5) = 1.0471975511966
acos(0.2) = 1.36943840600457
acos(-0.5) = 2.0943951023932
acos(-0.2) = 1.77215424758523
acos(1) = 0.0
acos(0) = 1.5707963267949
acos(-1) = 3.14159265358979
acos(2) =
acos(-2) =