COS Function

Purpose

Returns a value that is the cosine of the specified angle expressed in radians.

Syntax

COS(X)

Parameters

x is a floating-point value.

Description

The COS function returns a value that is the cosine of the angle x expressed in radians. The result has the same data type as x such that -1 ≤ COS(x) ≤ 1.

Examples

COS(0.0)   /* returns 1.0 */

Restrictions

A COS operation on floating-point decimal data is actually performed using the floating-point binary operation. Thus, the range of the operands and the result of the operation are limited to the ranges for floating-point binary numbers.