Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: fibonacci numbers using subroutine?

by dHarry (Abbot)
on Aug 20, 2010 at 08:24 UTC ( [id://856206]=note: print w/replies, xml ) Need Help??


in reply to fibonacci numbers using subroutine?

As you have nothing to do you might also want to take a look at Binet's formula to calculate Fibonacci numbers. See for example here or on wiki. It would be interesting to implement it and compare it to your solution. Fibonacci has been studied a lot and has many (surprising) applications like in trading (finance)!

  • Comment on Re: fibonacci numbers using subroutine?

Replies are listed 'Best First'.
Re^2: fibonacci numbers using subroutine?
by BrowserUk (Patriarch) on Aug 20, 2010 at 10:14 UTC
    Fibonacci has been studied a lot and has many (surprising) applications like in trading (finance)!

    I don't suppose you have any references to those uses?

    Aside from those exploring the purely theoretical properties of Fib, does anyone use anything much beyond say fib(1000)?:

    4346655768693745643568852767504062580256466051737178040248172908953655 +541794905189040387984007925516929592259308032263477520968962323987332 +247116164299644090653318793829896964992851600370447613779516684922887 +5

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Not really, but the following list gives an idea: petals on a flower, leaves, branching plants, Fibonacci spiral (e.g. Cauliflour), Music, Phi (golden ratio), the human body, finance (mainly for traders, like for example retracement), etc. There several books on the application of Fibonacci. I think for most practical purposes the number is big enough!

        Thank you the retracement link. I was aware of the link to the Golden Ratio and many of places in the natural world and artistic endeavours where it crops up.

        As a teenager I was fascinated by the GR for several years. I wrote my first recursive Fib routine when I was 15 in an interpreted assembler-like teaching language called BBCX (that was itself implemented in an interpreted BASIC and ran on a TOPS-20 mainframe at a Uni miles away).

        Runtime was strictly limited, so I had to get special permission to have the program run over a weekend in order for it to calculate the first 23 terms (16-bit signed integer limit). I don't remember how many hours it ran, but it was a looong time.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://856206]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found