COS( ) Function

Returns the cosine of a numeric expression.

COS(nExpression)

Return Values

Numeric

Parameters

  • nExpression
    Specifies a numeric expression whose cosine COS( ) returns. nExpression can be any value.

Remarks

COS( ) returns the cosine of nExpression in radians. Use DTOR( ) to convert an angle from degrees to radians. The number of decimal places that COS( ) returns can be specified with SET DECIMALS. The value COS( ) returns ranges between –1 and 1.

Example

CLEAR
? COS(0)  && Displays 1.00
? COS(PI( ))  && Displays -1.00
? COS(DTOR(180))  && Displays -1.00
STORE PI( ) * 3 TO gnAngle
? COS(gnAngle)  && Displays -1.00

See Also

ACOS( ) Function | DTOR( ) Function | RTOD( ) Function | SET DECIMALS Command | SIN( ) Function