rubyx/stash/fibo_times.ruby
Torsten Ruger d6108e7b3a fix interpreter overflow issue
flag set for bigness, result reduced
tests for + and *
fixed fibs tests
2015-11-08 15:15:55 +02:00

15 lines
201 B
Ruby

def fibonaccit(n)
a = 0
b = 1
(n-1).times do
tmp = a
a = b
b = tmp + b
end
b
end
#1000000.times {fibonaccit( 30 )}
#10.times {|i| puts fibonaccit(i+90).class}
puts fibonaccit 90