Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Functions : COS
 

COS

Returns the cosine of expression.

Syntax

COS ( expression )

Notes

*COS takes an angle expression and returns the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse.
*The expression specifies an angle in radians.
*The expression must evaluate to an approximate numeric data type.
*To convert degrees to radians, multiply degrees by Pi/180. To convert radians to degrees, multiply radians by 180/Pi.

Example

This example illustrates the COS function:
select cos(45 * pi()/180) 'Cosine of 45 degrees'
from sysprogress.syscalctable;
COSINE OF 45 DEG
----------------
0.707106781186548
1 record selected

Compatibility

ODBC compatible