code not true?
kragen at dnaco.net
Sun Apr 23 01:49:03 CEST 2000
In article <jwbnews-6EFA9D.13383522042000 at news.olympus.net>,
John W. Baxter <jwbnews at scandaroon.com> 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 pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
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