COS

Purpose : Calculates the trigonometric cosine of a numeric value.

Format:     COS( value )

Notes:      value   must be a constant or a numeric variable name and expressed in radians.  The result is in radians rather than degrees.  Radians are a unit of angle measurement that is mathematically more convenient than degrees.  Where angles specified in degrees range from 0 to 360,  angles specified in radians range from  0  to  2pi,  with  0  radians measured along the positive X axis and increasing counterclockwise.  This puts the positive Y axis (90 degrees) at  pi/2  radians,  the negative X axis (180 degrees) at pi radians,  and the negative Y axis (270) degrees at  3pi/2.  If you are more comfortable with degrees,  radians can be converted to degrees by multiplying a radian value by 57.2958 .  Convert degrees to radians by multiplying by 0.0172533 .

Example:

# Calculate the Cosine of an angle
# entered by user in radians

input a " Enter Angle in Radians: "

b = cos(a)

print "The Cosine is " b " Radians

pause
exit

See Also:  ATAN   SIN  TAN