The COT function returns the cotangent of a number given in radians.
This function takes a single Number as input. It parses that number in radians and outputs its cotangent.
COT(number) -> cotangent
- number (required, type: Number)
- The number to calculate the cotangent of. This number is parsed in radians.
- cotangent (type: Number)
- The cotangent of the given number.
The following example returns the cotangent of 45. Note that while the cotangent of 45 degrees is 1, the tangent of 45 radians is 0.6173696237835551, and this is the number the COT function returns:
COT(45) -> 0.6173696237835551
In order to calculate the cotangent of a number of degrees, said number must first be converted into radians using the function RADIANS. The following example returns the cotangent of forty-five degrees by first converting forty-five degrees into radians and then calculating the cotangent of the resulting number. Note that, due to small rounding errors, the number COT returns is not exactly one, but something very close to it. This behavior matches that of most computational calculators and should be sufficient for most practical purposes:
COT(RADIANS(45)) -> 1.0000000000000002
Mathematically, the cotangent of 0 radians is undefined, and so when 0 is given as input for the COT function, it outputs NULL, such as in the following example:
COT(0) -> NULL
Mathematically, the cotangent of an angle is the cosine of that angle multiples by the reciprocal of the sine of that angle. The relationship between the functions COT, COS, and SIN is the same, such that, for some number n:
COT(n) = COS(n)/SIN(n)