wu :: forums
« wu :: forums - Fibonacci Series »

Welcome, Guest. Please Login or Register.
Nov 28th, 2024, 9:43am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   general problem-solving / chatting / whatever
(Moderators: SMQ, Eigenray, Grimbal, towr, william wu, ThudnBlunder, Icarus)
   Fibonacci Series
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Fibonacci Series  (Read 409 times)
kens
Junior Member
**





   


Posts: 59
Fibonacci Series  
« on: Jul 24th, 2007, 3:37pm »
Quote Quote Modify 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: male
Posts: 13730
Re: Fibonacci Series  
« Reply #1 on: Jul 24th, 2007, 3:38pm »
Quote Quote Modify 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: male
Posts: 2084
Re: Fibonacci Series  
« Reply #2 on: Jul 24th, 2007, 4:28pm »
Quote Quote Modify Modify

on Jul 24th, 2007, 3:38pm, towr wrote:
A closed formula.

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

Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board