MariaDB COT() Function

In MariaDB, COT() is a built-in numeric function that returns the cotangent of a given number.

MariaDB COT() Syntax

Here is the syntax of the MariaDB COT() function:

COT(number)

Parameters

number

Required. A numeric value used to calculate the cotangent.

If you provide the wrong number of parameters, MariaDB will report an error: ERROR 1582 (42000): Incorrect parameter count in the call to native function 'COT'.

Return value

The MariaDB COT() function returns the cotangent of the specified number.

If any parameter number is NULL, the COT() function will return NULL.

MariaDB COT() Examples

Here is an example:

SELECT
    COT(2.5),
    COT(0.2),
    COT(-0.5),
    COT(-0.2),
    COT(0),
    COT(PI()),
    COT(NULL)\G

Output:

 COT(2.5): 0.5984721441039565
 COT(0.2): 0.19866933079506122
COT(-0.5): -0.479425538604203
COT(-0.2): -0.19866933079506122
   COT(0): 0
COT(PI()): 1.2246467991473532e-16
COT(NULL): NULL

Conclusion

In MariaDB, COT() is a built-in numeric function that returns the cotangent of a given number.