©SQL :: Manager
HomeProgram InformationTechnical detailsFree downloadDonate for a cup of coffee
myway SQL Manager for MySQL and MariaDB, Download on Uptodown
SQL functionMySQLMariaDB

The COT SQL Function in MySQL and MariaDB - Cotangent calculation

COTSyntax:COT(Number)
Return value:FLOAT
Function type:Numeric function
Function Description

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

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: Download

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.
CONVERTCONVERT_TZCOSCOTCOUNTCRC32CURDATE

Further MySQL und MariaDB SQL Numeric functions

BIT_COUNTBIT_COUNT(Integer)
More about BIT_COUNT Function

CEILCEIL(Number)
More about CEIL Function

CEILINGCEILING(Number)
More about CEILING Function

CRC32CRC32(String)
More about CRC32 Function

CRC32CCRC32C([Parameter], String)

FLOORFLOOR(Number)
More about FLOOR Function

SIGNSIGN(Number)
More about SIGN Function

ABSABS(Number)
More about ABS Function

ACOSACOS(Number)
More about ACOS Function

ASINASIN(Number)
More about ASIN Function

ATANATAN(Number [, Number2])
More about ATAN Function

ATAN2ATAN2(Number [, Number2])
More about ATAN2 Function

COSCOS(Number)
More about COS Function

DEGREESDEGREES(Number)
More about DEGREES Function

EXPEXP(Number)
More about EXP Function

LNLN(Number)
More about LN Function

LOGLOG([Base], Number)
More about LOG Function

LOG10LOG10(Number)
More about LOG10 Function

LOG2LOG2(Number)
More about LOG2 Function

MODMOD(Number, Divider)
More about MOD Function

POWPOW(Number, Exponent)
More about POW Function

POWERPOWER(Number, Exponent)
More about POWER Function

PIPI()
More about PI Function

RADIANSRADIANS(Number)
More about RADIANS Function

RANDRAND([Number])
More about RAND Function

ROUNDROUND(Number [, Decimals])
More about ROUND Function

SINSIN(Number)
More about SIN Function

SQRTSQRT(Number)
More about SQRT Function

TANTAN(Number)
More about TAN Function

TRUNCATETRUNCATE(Number, Decimals)
More about TRUNCATE Function

Numeric functionsString functionsRegular ExpressionsDate and Time functions
Comparison functionsEncryption & CompressionConversion functionsNULL functions
Aggregate functionsWindow functionsJSON functionsGeometric functions
Sequence functionsInformation functionsDynamic ColumnsMiscellaneous functions
More information about the COT SQL function: mysql.com and mariadb.com and w3schools.com
Updated: 2023-09-24ImprintContactTerms & conditionsPrivacy & CookiesUpdatesSitemapFacebookLinkedinTwitterStatistics©2020-2024 Heino Cunze-Fischer