Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

COS

Description

The function calculates the cosine of any angle using floating point arithmetic, then rounds to the PRECISION implied by the jBASE BASIC program, which makes it very accurate. The function takes the general form:

 COS(expression)

Where the expression must evaluate to a numeric result or a runtime error will occur.

Note:

The function assumes the value returned by expression to be in degrees.

An example of use is as:

     FOR I = 1 TO 360
         CRT COS(I)  ;* print cos i for 1 to 360 degrees
     NEXT I


Go back to jBASE BASIC.

Was this article helpful?