Page 3 of 3

Re: Difference between New rom and Old Rom

Posted: Sun Apr 04, 2021 12:11 am
by Crayon21
McKlaud wrote: Mon Nov 05, 2018 9:15 pm regarding your second question, try these:

Code: Select all

PRINT PEEK 3823

PRINT SQR 0.25

PRINT 0.25 ^ 2

PRINT 4 - 0.0000000001

PRINT SQR 0.0625
If you have Zeddy with the bugged ROM results might surprise you.
late comment but, edition 2 is bugged. took me till now to realize it

Re: Difference between New rom and Old Rom

Posted: Sun Apr 04, 2021 12:41 am
by Crayon21
Crayon21 wrote: Sun Apr 04, 2021 12:11 am
McKlaud wrote: Mon Nov 05, 2018 9:15 pm regarding your second question, try these:

Code: Select all

PRINT PEEK 3823

PRINT SQR 0.25

PRINT 0.25 ^ 2

PRINT 4 - 0.0000000001

PRINT SQR 0.0625
If you have Zeddy with the bugged ROM results might surprise you.
late comment but, edition 2 is bugged. took me till now to realize it
also noticed a weird thing. On the old rom, entering one of the programs apparently intrudes into screen memory (it prints symbols instead of doing what it's supposed to) and crashes the computer on the old rom. 5th program down.

Re: Difference between New rom and Old Rom

Posted: Sun Apr 04, 2021 1:56 pm
by Moggy
All the ROMs could be classed as bugged as they still have the rounding errors inherent in floating point maths.
There was a couple of articles by maths guru Frank O'Hara in ZX computing that explained this in great depth along with work-arounds in BASIC.

Internally the ZX81 is accurate to 9.5 digits of accuracy but after rounding displays only 8.

So asking for an accurate resolve of PRINT 4 - 0.0000000001 and getting an erroneous result from a device that for all practical purposes is accurate to 8 digits is entirely expected considering this is an 11 digit decimal.

The "bug" was an admitted mistake by John Grant,owner of Nine Tiles authors of the ROM, in the floating point division routine therefore a bug whereas things like the example above are due to the aforesaid rounding errors and accuracy of held numbers rather than mistaken ROM coding.