in reply to Re^2: Fibonacci golf with one state variable
in thread Fibonacci golf with one state variable
That's why it only prints the first few terms, with 18 hard-coded it. If you used the golden ratio more precisely, you'd get more terms. Two examples are the first snippet in Re: Fibonacci Numbers or the last one in Re: Fibonacci numbers (again).
(By the way, if you want to know about the mathematics of this, I recommend Graham–Knuth–Patashnik: Concrete mathematics.)
|
---|