Documentation/Calc Functions/COT
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
Function name:
COT
Category:
Mathematical
Summary:
Calculates the trigonometric cotangent (cot) of an angle expressed in radians.
Syntax:
COT(Number)
Returns:
Returns a real number that is the trigonometric cotangent of the specified angle.
Arguments:
Number is a real number, or a reference to a cell containing that number, which is the angle in radians whose trigonometric cotangent is to be calculated.
- If Number is non-numeric, then COT reports a #VALUE! error.
- If Number is equal to 0, then COT reports a #NUM! error.
Additional details:
If your angle is expressed in degrees, either multiply by PI()/180 or use the RADIANS function to convert to radians.
The formula for the trigonometric cotangent of x is:
[math]\displaystyle{ \cot (x)~=~ \frac{1}{\tan(x)} ~=~\frac{\cos(x)}{\sin(x)} }[/math]
Mathematically, the cotangent of any integer multiple of π, i.e. {......-2π, -π, 0, π, 2π.....} is undefined. For this reason, COT reports an error when its argument is equal to 0. However, because of the inherent inaccuracy in representing π numerically, COT does not report errors for other argument values. You should be aware that COT will return large positive or negative results for non-zero integer values of π.
The figure below illustrates the function COT.
Examples:
Formula | Description | Returns |
---|---|---|
=COT(1) | Trigonometric cotangent of 1 radian. | 0.642092615934331 |
=COT(D1) where cell D1 contains the number -0.5. | Trigonometric cotangent of -½ radian. | −1.83048772171245 |
=COT(PI()/4) | Trigonometric cotangent of π/4 radians. | 1 |
=COT(RADIANS(60)) | Trigonometric cotangent of 60°, after first converting the angle from degrees to radians. | 0.577350269189626 |
=DEGREES(ACOT(COT(RADIANS(60))) | An angle of 60° is converted to radians, its cotangent is taken, then the inverse cotangent of that value is calculated, and finally the result is converted back to degrees. | 60 |
Related LibreOffice functions:
ODF standard:
Related (or similar) Excel functions:
COT since v.2013.