cotangent function
The cot function is a trigonometric function. The cot function returns the cotangent of an angle specified in radians.
Syntax:
double cot(n)
Semantics:
-
n: The argument n is an expression that resolves to a number (an angle expressed in radians).
-
return type: double.
-
Returns a NULL value in the following cases:
-
n resolves to a NULL value
-
n does not resolve to a number
-
-
Returns NaN if n resolves to NaN or infinity(positive/negative).
-
Example 1 - cotangent function
SELECT cot(n) FROM Archery
| Value of n | Output |
|---|---|
| 0 | Infinity |
| radians(90) | 6.123233995736766E-17 |
| pi()/4 | 1.0000000000000002 |