By bloid
via pythonista.wordpress.com
Published: Jul 04 2008 / 17:15
A while back, I came across this post, in which the author implements a couple of different algorithms to generate Fibonacci numbers in Python. What he finally ends up with is an algorithm that essentially does matrix exponentiation by repeated squaring, and it runs fairly fast.
Add your comment