Faster Recursive Fibonacci Numbers

Chris Angelico rosuav at gmail.com
Fri May 20 02:06:40 EDT 2011


On Fri, May 20, 2011 at 3:58 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> ... until you deleted most of it :)

Minimalist quoting practice! :)

> If you want an *accurate* fib() function using exponentiation of φ, you
> need arbitrary precision non-integers.

I believe the 'bc' command-line calculator can do a-p non-i, and I
know REXX can, but it seems to be quite an unusual thing. Is it that
much harder than a-p integer that it's just not worthwhile? It seems
strange to smoothly slide from native integer to long integer and just
keep on going, and yet to be unable to do the same if there's a
fractional part on it.

Chris Angelico



More information about the Python-list mailing list