Skip to main content

COS

Calculates the cosine of a specified angle given in radians.

See also:
[SELECT]


Syntax

SELECT COS(radian_value) FROM <multipartIdentifier>;

Arguments

radian_value
A numeric expression that specifies the angle in radians for which the cosine is to be calculated.

Return Value(s)

Returns the cosine of the specified angle.


Examples

Calculate the cosine of π/3 radians

SELECT COS(PI() / 3) AS cosine_value;

This query returns 0.5, as the cosine of π/3 radians is 0.5.

Calculate the cosine of π radians

SELECT COS(PI()) AS cosine_value;

This query calculates the cosine of π radians, resulting in -1, since the cosine of π is -1.