EasyManua.ls Logo

Commodore CBM - BASIC Arithmetic Functions; Abs; Atn; Cos

Commodore CBM
447 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BASIC ARITHMETIC FUNCTIONS
ABS
ABS returns the absolute value. or magnitude. of a number. This
is
the value
of the number
without
regard to sign.
Format:
ABS(arg)
where:
arg
Examples:
is
a numeric constant. variable or
expression.
ATN
A=ABS(10)
A=ABS(-10)
PRINT
ABS(Xl.ABS(Yl.ABS(Z)
Results in
A=l
O.
Results in
A=10.
arg
ATN returns the arctangent of the argument.
Format:
ATN(arg)
where:
is
a numeric constant. variable or
expression.
ATN returns the value in radians in the range
± 17.
Examples:
A=ATN(AG)
?180/7T*ATN(A) Prints the value in degrees.
cos
COS
returns the cosine of the argument.
Format:
COS(arg)
where:
arg
Example:
A=COS(AG)
150
is
a numeric constant. variable. or expression
representing an angle in radians.

Table of Contents

Other manuals for Commodore CBM

Related product manuals