|No such thing as a small change|
Re: Fibo Golf challenge on 3 monkeysby ambrus (Abbot)
|on Jul 16, 2007 at 09:07 UTC||Need Help??|
Let's see. We already have lots of fibonacci generator threads, like (OT) Fibonacci numbers in Ruby - final shot - 24 chars, Golfing a fibonacci number generator, Fibonacci Numbers, Fibonacci numbers (again)1 Fibonacci golf with one state variable1. We can use some ideas from those threads.
Firstly, modifying my dc solution, we get
Then there's the ruby one you can adapt
I'll try to improve these and update this node later if I can.
Update: longer variants of the ruby line are:
Update: I forgot to tell, but for just the first twenty numbers, the shorter dc one should work fine as well:
Update: The following which doesn't use head is even shorter
The following is yet one character shorter, but it takes some seconds to compute because it computes square roots to thousands of decimal places.
Update: Even shorter and does not have the speed penalty is this:
Update: And you can cut one more character:
Update 2008 oct 5: added two links marked by 1.