COS

Trigonometric function that calculates the cosine of a specific value in radians.

Syntax

COS(<value>)

Parameters

Parameter Description Supported input types
<value> The value that determines the returned cosine in radians. DOUBLE PRECISION

Return Type

COS returns a value of type DOUBLE PRECISION.

Example

The following query calculates the cosine of 0:

Interactive SQL Playground 🔥
SELECT COS(0) as result;

The following query calculates the cosine of pi:

Interactive SQL Playground 🔥
SELECT ROUND(COS(PI()), 5) as result;