MySQL COS() Function

In MySQL, the COS() function returns the cosine of the specified number.

COS() Syntax

Here is the syntax of MySQL COS() function:

COS(number)

Parameters

number
Required. An angle, in radians.

Return value

In MySQL, the COS() function returns the cosine of the specified number.

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

COS() Examples

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

output

*************************** 1\. row ***************************
 COS(2.5): -0.8011436155469337
 COS(0.2): 0.9800665778412416
COS(-0.5): 0.8775825618903728
COS(-0.2): 0.9800665778412416
   COS(0): 1
COS(PI()): -1
COS(NULL): NULL