Returns the angle in radians whose cosine is the given float expression (also called arccosine).
ACOS(float_expression)
float
This example returns the ACOS of the given angle.
SET NOCOUNT OFF
DECLARE @angle float
SET @angle = -1
SELECT 'The ACOS of the angle is: ' + CONVERT(varchar, ACOS(@angle))
Here is the result set:
--------------------------------------------------------
The ACOS of the angle is: 3.14159
(1 row(s) affected)
This example sets @angle to a value outside the valid range.
SET NOCOUNT OFF
DECLARE @angle float
SET @angle = 1.01
SELECT 'The ACOS of the angle is: ' + CONVERT(varchar, ACOS(@angle))
Here is the result set:
--------------------------------------------------------
NULL
(1 row(s) affected)
A domain error occurred.