szabgab/perlmaven.com

Comment: Integer Overflow

Opened this issue · 0 comments

I love it! However this code will end long before the computer system runs out of memory - since the Fibonacci numbers grow exponentially (as φ^n), this will exceed the maximum integer storage very quickly.

If we take the maximum integer value of 2^64, this will be exceeded by the 93rd Fibonacci number. If we're looking for accuracy of resolution (which is lost around 2^53, the value will no longer be accurate after the 80th Fibonacci number.

P.S. This is my first GitHub post; please let me know if I'm doing this wrong.