Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5703

Re: Faster Recursive Fibonacci Numbers

From rusi <rustompmody@gmail.com>
Newsgroups comp.lang.python
Subject Re: Faster Recursive Fibonacci Numbers
Date 2011-05-18 08:23 -0700
Organization http://groups.google.com
Message-ID <3ea62d61-cc9f-46ff-84a1-5c2cdfb1af13@18g2000prd.googlegroups.com> (permalink)
References <e0ad4a60-bc05-4640-be96-ec454050c10a@k27g2000pri.googlegroups.com>

Show all headers | View raw


On May 18, 7:27 pm, RJB <rbott...@csusb.edu> wrote:

> Thank you!  Very cool and clear.  I
> hoped that there was something that Python made natural I couldn't see
> after 50 years in other languages.
>
> I'd like to work on combining both approaches.  It may take a while...

From the Knuth identity F[n+m] = ..
you pulled out two special cases
F[2n+1] = ..
and
F[2n] = ..

If you get one more: F[2n -1] = ..
you are done

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Faster Recursive Fibonacci Numbers RJB <rbotting@csusb.edu> - 2011-05-18 07:27 -0700
  Re: Faster Recursive Fibonacci Numbers rusi <rustompmody@gmail.com> - 2011-05-18 08:23 -0700

csiph-web