Thorium wrote:blueznl wrote:I never understood how ol' GFAbasic did this, but IIRC there it would pass this test. I should reinstall it one of these days and see if I remember correctly.
It's commonly done by doing rounded comparisions.
Hmmm. I'm not totally convinced

I always suspected them of doing some 'behind the scenes' manipulation using shifted decimals. I know I've used that approach myself sometimes in some financial application where I had to deal with very large and very small numbers. I was using three elements, float flag, base, exponent, like this:
2.5 = 2.5 x 10^0 and would be stored as 0 25 0
25 = 2.5 x 10^1 and would be stored as 0 25 1
250000000 = 2.5 x 10^8 and would be stored as 0 25 8
2/3 wouldn't fit in that scheme and would be stored as a 1 followed by a float
I must have some of that code somewhere, figuring out when to pick what format was a bit tricky. IIRC the root trigger was that the floats weren't accurate enough for certain things. Even worse, the biggest Int was 64k so I wrote my own little math lib in 6502 assembly to handle larger numbers. (It was some software that calculated the pricing of electronic components in large numbers, ie. very low component prices, and pretty big total numbers. Ah... long ago, when I was still young...)