Fof
a
number less than
one with several decimal
places, Ihe second
number would
be
a
-
instead ol a +, indicating
ihat Ihe decimal point
Is
moved lo the right.
For example
0003359
-
3.359E
-
4
Other examples
20
=
2E + 1
105000= 1
05E + 5
.0666
-
6.66E
-
2
the decimal
point is moved 1 digit left
the decimal point is
moved 5 digits left
the
decimal point is moved
2
digits right
PERFORMING
CALCULATIONS
To per'orm
a
calculation,
type PRINT and
men the math problem
without quotes,
as
in
the
following:
10
PRINT 1+2,
2-1
20 PRINT 2«2,
4/2
RUN
3 1
For
the first time, PRINT didn't print exactly
what you
typed
In
the
statement. Instead,
your computer solved
the calculations and PRINTed
only tho answers. All
you have to
do to use
PRINT
to calcuiato is omit
the quotation marks,
Now try this:
NEW
10 PRINT
"2001/2010"
20 PRINT 2001
-
17
RUN
2001/2010
11984
one space is left here lor
Ihe
answer's
sign
Since line
10 Is in quoles, your computer
|ust PRINTs the problem
as if
it were regular
lext: exactly
as
it appears between the
quotation marks.
Notice that no
space
is left for
the number's sign from line
10, as
it
is in
the printout for
line 20.
Now
move
the cursor back
lo
line 1 and
change the line
lo
this:
56
I
10 PRINT
"2001/2010="
2001/2010
RUN
2001/2010=
.995522388
1984
I
don't
forget
the
semicolon
this space >s
left tor
the answer's
sign
Ihe answer for line 20 stays the
same
If
you
want
to both
PRINT
the
problem AND solve il you have to type
it
twice once in quoles and once out ot quotes, as
line 1
shows.
Order of Calculation
You can
perform more than
one
calculation in one line. Try typing this.
PRINT
200-50+3
Is the answer whal
you expected? Try
this:
PRINT SO+5'200
Your Commodore 1
6
always performs calculations in a
certain
order.
Problems
are
solved from left
to right;
within
thai
general rule,
some
types
of calculations are solved first. The order thai
your
computer
evaluates expressions is called the order of precedence.
FIRST: Your computer checks
for
negative numbers (not subtrac-
tion, just negative numbers).
SECOND; Your computer soVes any exponents.
THIRD: Your
computer solves all multiplication and division, from left
to right.
FOURTH. Your computer solves addition and subtraction,
from
left to
right
NOTE: Your Commodore 1
6
always solves any pari of the problem
that's surrounded
by
parentheses first. You can even put
parentheses within parentheses: 36
•
(1 2 + (A / 3)).
The contents
of
the
Innermost parentheses are solved first.
Sometimes
it's a good
idea
to oul
negative numbers in parentheses lor
clarity. For example, if
you
want
to
multiply 45
by
-5, type II like this:
4S*<— 5)
Your computer can understand it with or without parentheses.
57