What I can't explain is why the same statement "LET a=-0.999999999999999999999999" gives two different results in this case.
I would expect -1 as rounding, or anything else, what puzzles me is that the result is not consistent.
I tried the same listing on Spectrum BASIC and the result is always 2... why not -1 ?
- 10 LET A=-0.9999999999999999
20 PRINT -0.9999999999999999
30 PRINT A
40 POKE 16436,255
50 POKE 16437,255
60 LET SS=PEEK 16436+256*PEEK 16437
70 FOR F=1 TO 100
80 LET A=-0.9999999999999999
90 NEXT F
100 LET EU=PEEK 16436+256*PEEK 16437
110 LET E1=ABS SS-EU
120 PRINT A;":",E1/50;""""