COS


The COS function calculates the cosine of any angle using floating point arithmetic, then rounds to the precision implied by the jBC program. This makes it very accurate.

 

COMMAND SYNTAX

COS(expression)

This function calculates the cosine of an expression.

 

SYNTAX ELEMENTS

The expression must evaluate to a numeric result or a runtime error will occur.

 

NOTES

The value returned by expression is assumed to be in degrees.

 

EXAMPLES

FOR I = 1 TO 360
    CRT COS(I) ;* print cos i for 1 to 360 degrees
NEXT I


jBC