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.