Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Fibonacci golf with one state variable

by JavaFan (Canon)
on Oct 05, 2008 at 13:21 UTC ( #715433=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Fibonacci golf with one state variable
in thread Fibonacci golf with one state variable

Well, I'd argue that *not* outputting zero isn't quite right. Usually, the Fibonacci sequence is defined as F(0) = 0; F(1) = 1; F(n) = F(n-1) + F(n-2), n > 1. See for instance Sloane: The On-Line Encyclopedia of Integer Sequences and Graham, Knuth and Patashnik in Concrete Mathematics. Eric Weisstein defines the sequence as starting with F(1) = F(2) = 1 and then states it's conventional to define F(0) = 0.


Comment on Re^3: Fibonacci golf with one state variable
Replies are listed 'Best First'.
Re^4: Fibonacci golf with one state variable
by aufflick (Deacon) on Oct 06, 2008 at 03:13 UTC
    Can't fault your references!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2015-07-30 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls