COS (Function)


Obtains a cosine.


COS (<Expression>)


This statement obtains the cosine value of the value in <Expression>.
Designate the unit of <Expression> in degrees.
If <Expression> includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained.
If an argument is entered in radians, add RAD followed by the constant.
The COS function receives an angle as an argument and returns the ratio of the 2 sides of a right triangle including the right angle. The 2 sides mentioned include the angle designated to the argument number. The ratio of the 2 sides is the value of the adjacent side length (base) to the hypotenuse side (oblique side) length. The return value ranges from -1 to 1. To convert degrees to radians, multiply the degrees by π/180. To convert radians to degrees, multiply the radians by 180/π.



DEFSNG lf1, lf2, lf3, lf4, lf5
lf1 = COS(0.78525RAD)
'Assigns the cosine value of 0.78525 (Radian) to lf1.
lf2 = COS(lf4)
'Assigns the cosine value of lf4 to lf2.
lf3 = COS(45) * lf5
'Assigns the cosine value of 45 degrees multiplied
'by lf5 to lf3.


Top