Commodore VIC-20 User Manual page 75

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

Advertisement

0.5
0.0165432
-0.0000009
1.6
24.0055
-64.2
3.1416
Chapter 3: Programming the VIC 20 Computer
61
Note that if you put commas in a number, you will get a syntax error
message. For example, use 65000, not 65,000.
ROUNDOFF
Numbers always have at least eight digits of precision; they can have up
to nine, depending on the number. VIC BASIC rounds off additional
significant digits. Usually it rounds up when the next digit is more than 5 and
rounds down when the next digit is 4 or less, but there are some roundoff
quirks.
Here are some examples.
1._ • • 66
.S5SS5555~~
____ __
"i~i_""!
l
Appears to round down on 6
• S55S5SS5ft....__
~
or less, up on 7 or more
,~,.JtijUJ'*jU~,i
• 111111111t.... _ _
?llH1tUll
I
Appears to round down on
5
or
. 'I' 11"1' 12
less, up on 6 or more
.111
+1-__
SCIENTIFIC NOTATION
Large floating point numbers are represented using scientific notation.
When numbers with ten or more digits are entered, VIC BASIC automati-
cally converts these numbers to scientific notation.
RERDY.
;~)I"1\i
"1. iiiiili1E+09
READY.
1l11\UUltS·
1. 11111112E+09

Advertisement

Table of Contents
loading

Table of Contents