COT | Syntax: | COT(Number) | Return value: | FLOAT | Function type: | Numeric function | |
|
|
The COT() function returns the cotangent value of "Number", where "Number" is in radians.
The RADIANS() function can also be used to calculate a cotangent from an angle value.
The COT() function returns NULL if the value of "Number" is NULL. |
SQL Examples for the COT function |
|
select radians(45);
select cot(0.7853981633974483);
select cot(radians(45));
select cot(radians(-45));
select round(cot(radians(90)),16);
select round(cot(radians(180)),2);
select round(cot(radians(270)),16);
select round(cot(radians(360)),2);
|
|
radians(45) |
double(23) |
0.7853981633974483 |
|
|
cot(0.7853981633974483) |
double(23) |
1.0000000000000002 |
|
|
cot(radians(45)) |
double(23) |
1.0000000000000002 |
|
|
cot(radians(-45)) |
double(23) |
-1.0000000000000002 |
|
|
round(cot(radians(90)),16) |
double(33) |
0.0000000000000001 |
|
|
round(cot(radians(180)),2) |
double(19) |
-8165619676597684.00 |
|
|
round(cot(radians(270)),16) |
double(33) |
0.0000000000000002 |
|
|
round(cot(radians(360)),2) |
double(19) |
-4082809838298842.00 |
|
|
|
The examples were created with the MyWAY SQL manager: |
How to use the COT() function in MySQL and MariaDB databases |
The COT() function in MySQL and MariaDB returns the cotangent value, which is the reciprocal of the tangent of an angle. The function is commonly used in trigonometric calculations and applications involving angles. This can be useful when angle-related values such as coordinates, distances or projections need to be calculated. |
|
Further MySQL und MariaDB SQL Numeric functions |
|