3 ms·
Pretty cool - and accurate. In the IBM Model 5150, there was a bug in Microsoft's floating-point math routine of the PC's BASIC ROM chip. If you ask the system
by arbuge 11y ago
Pretty cool - and accurate. In the IBM Model 5150, there was a bug in Microsoft's floating-point math routine of the PC's BASIC ROM chip. If you ask the system to divide 0.01 by 10, it displays 9.999999E-4, instead of the correct answer of 0.001.
You can see this by launching into BASIC from the simulation and trying:
print 0.01/10
compare this to for example:
print 0.01/100
Dating myself here, but I still remember coding up quicksort programs in computer science class on these things, back in high school in the 80s.
- jerf 11y agoThat's not really a "bug": http://0.30000000000000004.com/ http://0.30000000000000004.com/
- khedoros 11y agoI know the point that you're making, but I'm not sure that the simulation has the 8087, or that the BASIC ROM would use it if it did. The software implementation has some interesting quirks: print 0.1/10 0.01 OK print 0.01/10 9.999999E-4 Ok print 0.01/5 0.002 Ok print 0.001/10 0.0001 Ok print 0.1+0.2 0.3 Ok