Quote:
2) Every 1,000,000 iterations
Code:
if( 0 == (Iterations % 1000000) ) f *= f;
It works well in the beginning, but at some point the growth of the factor is too large
The current value of f is squared every 1M hands, so with f(0) = 1.000001, after i-million iterations f will be
f(i) = f(0)^(2^i)
In other words, it's not f that is growing exponentially in the number of iterations, but the exponent of f, so f will get prohibitively large very fast:
f(22) = 66.3
f(23) = 4,387
f(24) = 19,331,000
f(26) = 1.39 * 10^29 > 2^64 (at this point f will overflow)
The problem with exponential growth in general is that for sufficiently many iterations, your value will always become too large.
Maybe something like this is better suited:
f(i) = (1 + 0.001 * i) ^ k
where k is some positive integer.