COT() function :
This function in MySQL is used to return the cotangent of a specified number. If the specified number is 0, an error or NULL will be returned. In a right triangle, the cotangent of an angle is the length of it’s adjacent side divided by the length of the opposite side. Similarly, this can also be defined as cotangent of x is the cosine of x divided by the sine of x, where x is the angle.
This method accepts a parameter as given below as follows.
- number – Specified numeric value.
It returns the cotangent of a specified number.
The cotangent of 1 is 0.6420926159343306.
The cotangent of 0 returns an errors.
Error in SQL: DOUBLE value is out of range in 'cot(0)'
The cotangent of -3 is 0.6420926159343306.
The cotangent of 3 is -7.015252551434534.
This function is used to return the cotangent of a specified number.