Commodore 16 User Manual
Download Operation & user’s manual of Commodore 16 Desktop for Free or View it Online on All-Guides.com.
INTRODUCTION
You
don't have lo be
a
mathematics genius
to understano and make
use ol the
mathematics capabilities
ol your
Commodore 1
6. In addition
lo the straight-forward
operations like addition,
subtraction,
multiplication
and division,
you can use your computer to figure
out
advanced functions
like square
roots and sines. You'll leaxn
about the
different
types
of
variables, and
how to use them. Your computer
can
handle
single digit whole
numbers or complex numbers
of up to
38
places expressed m exponential
notation
with
equal
efficiency You can
do
your calculations
directly or
as
part
of programs finally, this
chapter
gives
you a brief explanation of now
lo set up your own functions lor
your computer lo
evaluate.
NUMBERS AND
OPERATIONS
You
can use your
computer like
a
simple calculator.
Besides tne
standard + and
—
operalion signs,
your Commodore
1 6 uses the
•
sign for
mulllplication and the
/
sign
lor
division
and fractions.
(Computers
use
the
*
sign instead ol
an
X for
multiplication
because a
computer can't tell
the difference
between trie letter X and
the
mathematical symbol
X.)
You can
use these operators and numbers
In
Immediate mode (no line
numbers) or In program
lines. Type In
numbers
and operators in PRINT
statements WITHOUT
QUOTES
if
you
want
your computer to perform
the math involved If
the
numbers
and
operators are
in
quotes (as in
PRINT
"2
+ 2"), your computer will
PRINT
exactly
that on the screen, instead
of performing tne
addition. You can
get
your computer
to put
two and two togelher
by
typing PRINT
2 + 2.
I
BASIC MATHEMATICAL
OPERATORS BASIC RELATIONAL
OPERATORS
Addition
+
Subtraclion -
Division
and fractions
/
Multiplication *
Exponentiation
r
(press SHIFT and
0)
Greater ihan
Less than
Equals
Greater man or equal
Less than or equal
Not
equal
to
>
<
>
> or
>"
<-
or
<
< > or
> <
NOTE: Your
computer doesn't accept commas
as pari
ol a
number.
For example,
you have lo lype 30359 Instead
of 30.359. It you put
a
comma in
a
number,
your computer
thinks you mean two numbers
(separated
by Ihe
comma),
and would read it
as 30 and 359 instead
of 30359.
54
I
:
I
J
Fractions and Decimals
You can write a
fraction like
this 5
or
like this: 1/2 Your computer Is actually
performing the division
If you pul a fraction in a PRINT statement,
your answer
is
always
returned as a
decimal
or
whole number
For
example.
RETURNPRINT 139/493 + 5
5.28194726
THE
PI KEY
Hore's an
example that
uses
pi
(3
1 41
59265
J,
which represents
the
ratio ol
the circumference ol
a
circle
to
its diameter. Use ihis value
by Just
pressing Ihe 7T key
(
Q
and =}:
PRINT
TT
/37* RETURN
8.39998C36E-03
Scientific Notation
What did your computer mean by the E-03
part of
Ihe
above answer?
Your
computer
displays decimal
numbers in
Ihe range
-999,999.999 to
999,999.999
In
standard
numerals. Numbers beyond this range (with
more than nine digits) are automatically displayed in
scientific notation.
You can
enter numbers in yourself in this form
and your
computer will
read them with
no
trouble (certainly less trouble than you had
converting mem!) Scientific notation is
often
uselul, since this
special
notation lets your
computer
display
targe
numbers
In lewer digits.
Here is how the number 198.505.478
would
be
written in scientific
notation
Omy ONE digil is
shown
to the
left
of
the
decimal point
1
.98505478E + B
—
This number is ihe number of
digit places the decimal
poini is
moved
55