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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Fibonacci golf with one state variable
by aufflick (Deacon) on Oct 06, 2008 at 03:13 UTC |
In Section
Seekers of Perl Wisdom