3 comments

[ 2.3 ms ] story [ 21.1 ms ] thread
Factorial, not fib
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.