Commodore 64 User Manual page 36

Hide thumbs Also See for 64:
Table of Contents

Advertisement

Up to this point we've just used small numbers and simple examples.
However, the Commodore 64 is capable of more complex calculations.
You could, for example, add a number of large figures together. Try
this, but don't use any commas, or you'll get an error:
'1 : 123.45 + 345. 78 + 7895.687
8364.917
That looks fine, but now try this:
12123123.45 + 345.78 + 7895.687
12131364.9
If you took the time to add this up by hand, you would get a different
result.
What's going on here? Even though the computer has a lot of power,
there's a limit to the numbers it can handle. The Commodore 64 can
work with numbers containing 10 digits. However when a number is
printed, only nine digits are displayed.
So in our example, the result was "rounded" to fit in the proper
range. The Commodore 64 rounds up when the next digit is five or more;
it rounds down when the next digit is four or less.
Numbers between 0.01 and 999,999,999 are printed using standard
notation. Numbers outside this range are printed using scientific nota-
tion.
Scientific notation is just a process of expressing a very large or small
number as a power of 10.
If you type:
123000000 000000000
1.23E+17
26
w

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Commodore 64

Table of Contents