I was working on my calculator in Algebra 2 today when i noticed something. I could take the Wild Stat Formula and add it's result to the Stat Point Formula's result so I would get this result:Wild Stat Result + Stat Point Result = Max Stat

However, someone here (spunman, I believe) took the Stat Point formula and figured out where the integral functions should apply. For reference, here are the formula's

Wild Stat = (int( Level * ( BaseStat + DV ) / 50 ) + 5)

This works out fine.

Stat Points = int(Level * int(( 16 + int(Sqrt(256 * Stat Exp - 512))) / 128) / 50 )

This, on the other hand, will give 62 with 65025 Stat Experience, which should yield 63.9999. I have found that this is due to the integral funtions.

For example, a max stat Mew (for simplicity sake, I will use his stats) at Level 100 has a 298 in everything besides HP. Here is how the two formula's above work it out, though:

(int(100 * (100 + 15) / 50) + 5) + int(100 * int((16 + int(sqrt(256 * 65025 - 512))) / 128) / 50)

(int(100 * 115 / 50) + 5) + int(100 * int((16 + int(Sqrt(1625625 - 512))) / 128) / 50)

(int(11500 / 50) + 5) + int(100 * int((16 + int(Sqrt(1625113))) / 128) / 50)

(230 + 5) + int(100 * int((16 + 4079) / 128) / 50)

235 + int(100 * int(4095 / 128) / 50)

235 + int(100 * 31 / 50)

235 + int(3100 / 50)

235 + 62

297, which is one point short of max.

If you take the integral functions out of the formula's above, and only apply one integral function on the final result, you obtain 298. Apparently, the game actually uses the decimal results in the Stat Calculations in order to give you the most boost.

So, in conclusion, the game actually doesn't have many integral functions when it comes to stat calculation. I believe, through testing, that only 2 int's exist in the above formula: the one in the Wild Stat formula and the outermost int in the Stat Point formula.