ACOS

All functions > MATH > ACOS

Returns the arccosine (inverse cosine) of a number in radians.

Signatures

Returns: Arccosine in radians (between 0 and π)

ACOS(number: T) → DOUBLE
sql
ParameterTypeRequiredDescription
numberTYesA number between -1 and 1 (inclusive)

Notes

  • Input must be in the range [-1, 1]
  • Returns values in the range [0, π] radians
  • ACOS(1) = 0, ACOS(-1) = π, ACOS(0) = π/2
  • Returns NULL if input is NULL
  • Returns NaN for inputs outside [-1, 1]
  • Inverse of COS function: ACOS(COS(x)) = x for x in [0, π]

Examples

FeatureQL
SELECT
    f1 := ACOS(1.0e0),  -- Arccosine of 1
    f2 := ACOS(0.5e0),  -- Arccosine of 0.5 (60 degrees)
    f3 := ACOS(0.0e0),  -- Arccosine of 0 (90 degrees)
    f4 := ACOS(-1.0e0)  -- Arccosine of -1 (180 degrees)
;
Result
f1 VARCHARf2 VARCHARf3 VARCHARf4 VARCHAR
0.01.04719755119659761.57079632679489663.141592653589793

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19