COT
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.
Declaration
Parameters
number (required, type: Number
) The number to calculate the cotangent of. This number is parsed in radians.
Return Values
cotangent (type: Number
) The cotangent of the given number.
Examples
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:
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:
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:
Discussion
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:
Last updated