COS Function
Calculates the cosine of an angle.
Syntax
COS(expression)
Syntax Elements
expression is any DataBasic expression that evaluates to a value in degrees.
The relation between radians and degrees is: 2 Pi radians = 360 degrees.
Operation
If there is no PRECISION statement in the program, the value is returned rounded to the nearest four decimal places. Otherwise, the number of decimal places returned is as specified by the PRECISION statement.
In each case, the significant decimal places returned are the result of rounding. However, only up to five places are significant: if the PRECISION statement specifies a precision greater than five, trailing zeroes are appended to the five significant places so as to return the numbers of places specified.
Examples
A = 35
B = COS(A)
PRINT B
Calculates and prints the cosine of 35 degrees (B = 0.8192).
X = 42
SECANT = COS(X) / SIN(X)
Calculates the secant of 4 degrees. SECANT = 1.1105.