Commodore VIC-20 Programmer's Reference Manual page 71

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

You type:
7.5555555556
VIC prints:
.555555555
(VIC appears to round down on 6 or less; up on 7 or more.)
You type:
$.5555555557
VIC prints:
.555555556
You type;
7.1111111115
VIC types:
.111111111
(VIC appears to round down on 5 or less; up on 6 or more).
You type:
7.1111111116
VIC types:
,111111112
These quirks result from the manner in which computers store
floating point numbers.
Floating point numbers can also be represented in scientific
notation. When numbers with ten or more digits are entered, the
VIC automatically converts them to scientific notation. Scientific
notation allows the VIC to accurately display these large numbers
using fewer digits. For example:
READY.
71111111114
1.11111111E + 09
READY.
71111111115
1.11t11112E+09
A number in scientific notation has the form:
numberE-ee
Where:
number
is an integer, fraction, or combination, as illustrated
above. The "number" portion contains the number's
significant digits; it is called the "coefficient." If no
decimal point appears, it is assumed to be to the
right of the coefficient.
E
is the upper case letter E.
±
is an optional plus sign or minus sign which indicates
the sign of the exponent,
ee
is a one- ar two-digit exponent. The exponent
specifies the magnitude of the number; that is, the
number of places to the right (positive exponent) or
to the left (negative exponent) that the decimal point
must be moved to give the true decimal point
location.
55

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents