SQL Server ACOT Function
Updated 2023-10-13 14:28:36.473000
Description
Use the scalar function ACOT to calculate the arccotangent, or inverse cotangent, of a number
Syntax
SELECT [westclintech].[wct].[ACOT] (
<@Z, float,>)
Arguments
@Z
The cotangent of the angle. @Z must be of type float or of a type that implicitly converts to float.
Return Type
float
Remarks
The returned angle is given in radians in the range zero to pi.
Examples
Example #1
SELECT wct.ACOT(2) as ACOT;
This produces the following result.
| ACOT |
|---|
| 0.463647609000806 |
Example #2
The following SQL can be run and the results pasted into Excel to graph the results of the function in the range -10, 10.
SELECT seriesValue as z,
wct.ACOT(Seriesvalue) as ACOT
FROM wct.SERIESFLOAT(-10, 10, .01, NULL, NULL);
Here's the graph of the results
