Author |
Topic: Fibonacci Series (Read 409 times) |
|
kens
Junior Member
Posts: 59
|
|
Fibonacci Series
« on: Jul 24th, 2007, 3:37pm » |
Quote Modify
|
What is the most efficient implementation of Fibonacci series?
|
|
IP Logged |
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: Fibonacci Series
« Reply #1 on: Jul 24th, 2007, 3:38pm » |
Quote Modify
|
A closed formula. Err, that is, if you find the Kth term. If you want to find to print the whole sequence (up to K), then simply remembering the last two and using them to find the next is best.
|
« Last Edit: Jul 24th, 2007, 3:39pm by towr » |
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
SMQ
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 2084
|
|
Re: Fibonacci Series
« Reply #2 on: Jul 24th, 2007, 4:28pm » |
Quote Modify
|
on Jul 24th, 2007, 3:38pm, towr wrote: Only if you already know phi to a sufficient precision, otherwise calculating phi takes longer than calculating Fibonacci. The gmp library, for instance, uses a recursion on Fib(k/2) and Fib (k/2 +/- 1) for calculating large Fibonacci numbers. --SMQ
|
|
IP Logged |
--SMQ
|
|
|
|