COS

Syntax

COS number

Explanation

COS outputs the cosine of its input, a number of degrees. Remember that COS x = adjacent / hypotenuse.

See also ARCTAN and SIN.

Examples

? COS 0

Result: 1

? COS 90

Result: 0

? COS 270

Result: 0

?

The following procedure defines the tangent function:

TO TAN :ANGLE

OUTPUT (SIN :ANGLE) / (COS :ANGLE)

END