OverflowDefect when executing fibonacci sequence with 'memoization'

2022-07-20 Thread Niminem
Ah, makes sense thanks man. I'm trying to learn recursion, dynamic programming and related concepts for a weird idea I have. Didn't even think about the value being too big for an int lol

OverflowDefect when executing fibonacci sequence with 'memoization'

2022-07-20 Thread doofenstein
I don't think it really has anything to do with your particular implementation. The fiboncci sequence grows very fast, so naturally at some point values won't fit an int in Nim (which is fixed in size to be equal to the size of a pointer, so likely 64-bit for you) has anymore. When So what are

OverflowDefect when executing fibonacci sequence with 'memoization'

2022-07-20 Thread Niminem
Hey guys, Below is a code snippet for the fibonacci sequence with 'memoization', a technique that stores the results of previous calls to a function so that the function can return the stored result instead of recalculating the result. This makes executing the fibonacci sequence much more effic