COS

BASin

COS COSine

Function

COS calculates the cosine of an angle.

How to use COS

COS is followed by a numeric variable, for example

140 LET x=COS y

An expression must be enclosed in brackets. The value following COS is the angle in radians. COS then returns the cosine of the angle. Degrees may be converted into radians by multiplying by PI/180.

Note that COS returns a negative value for angles from 90 to 270 degrees and a positive value for angles from 0 to 90 and 270 to 360 degrees.

Example

The command

PRINT COS (60*PI/180)

displays 0.5, the cosine of 60 degrees.

Format

  • COS num-const
  • COS num-var
  • COS (num-expr)

See also

Chapter 10.