COS()

Documentation

VoltDB Home » Documentation » Using VoltDB

COS()

COS() — Returns the cosine of an angle specified in radians.

Synopsis

COS( {numeric-expression} )

Description

The COS() function returns the cosine of a specified angle as a FLOAT value. The angle must be specified in radians as a numeric expression.

Example

The following example returns the sine, cosine, and tangent of angles from 0 to 90 degrees (where the angle is specified in radians).

SELECT SIN(radians), COS(radians), TAN(radians) 
     FROM triangles WHERE radians >= 0 AND radians <= PI()/2;