Ah, okay, I was afraid you were using floating point to calculate the Fibonacci numbers. But can't you do something like sum . filter even . takeWhile (< 4000000) $ fibs in ruby? Generate the infinite sequence lazily and consume what you need?
–
Daniel FischerMar 1 '12 at 0:53