code not true?

Kragen Sitaker kragen at
Sat Apr 22 19:49:03 EDT 2000

In article <jwbnews-6EFA9D.13383522042000 at>,
John W. Baxter <jwbnews at> wrote:
>Various alternate representations are possible which are exact (such as 
>BCD floating point of sufficient precision, rational numbers with 
>(potentially) Python longs as numerator and/or denominator, some 
>interesting recent work I haven't followed, etc etc etc).

Well, back in the 1970s, Gosper proposed to represent all computable
numbers exactly as continued fractions --- see HAKMEM for the details.
I haven't implemented it, but it looks like it should only be one or
two orders of magnitude slower than using standard integers or
floating-point (for normal uses, of course --- printing out pi to the
thousandth place will be slower in the continued-fraction form than in
the floating-point form, but that's because the continued-fraction
output is correct.)

There has been other, more recent work I haven't followed either.
<kragen at>       Kragen Sitaker     <>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
The power didn't go out on 2000-01-01 either.  :)

More information about the Python-list mailing list