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 the solutions?

  * Use double precision floating point numbers, they can go even higher, 
though the last digits will not be accurate anymore once the exponent is so 
high that one step in the mantissa is more than an integer.
  * Use a bignum library.
  * Don't bother, because this is only a stupid compsci exercise with little 
real world value anyway.


Reply via email to