Tuesday, March 8, 2011

jBase Infobasic Command COS

The COS 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.

Command Syntax

COS(expression)
;*// This function calculates the cosine of an expression.

Syntax Elements

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

Notes

Assumes the value returned by expression is in degrees.

Example

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

0 comments:

Post a Comment

 

Blog Info

A Pakistani Website by Originative Systems

Total Pageviews

Tutorial Jinni Copyright © 2015 WoodMag is Modified by Originative Systems