3 ms·
Although fib grows exponentially, so it does the same for not so big numbers (a back-of-an-envelope calculation gives me that fib(91) doesn't fit in 63 bits).
by gordaco 14y ago
Although fib grows exponentially, so it does the same for not so big numbers (a back-of-an-envelope calculation gives me that fib(91) doesn't fit in 63 bits).
OTOH, if I had to calculate fib(X), and not fib(1..X), I'd use the exponential formula (relying on floating point) instead of the recurrence (which uses integer), so I guess the error would be detected at the conversion to integer.