PostgreSQL COT Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL COT() function

COT() function

The PostgreSQL cot() function is used to return the cotangent of a given argument.

Syntax :

cot(a)

PostgreSQL Version : 9.3

Pictorial presentation of PostgreSQL COT() function

Example 1: PostgreSQL COT() function

SELECT COT(0) AS "Cot (0)";

Output :

 Cot (0)
----------
 Infinity
(1 row)

Example 2: PostgreSQL COT() function

SELECT COT(1) AS "Cot (1)";

Output :

      Cot (1)
-------------------
 0.642092615934331
(1 row)

Example 3: PostgreSQL COT() function

SELECT COT(-1) AS "Cot (-1)";

Output :

      Cot (-1)
--------------------
 -0.642092615934331
(1 row)