Thanks for the reply, I actually did try that but it still goes up to maybe in the 900,000's because it is just the display on the screen that gets changed. Nonetheless, I did find something that sort of seems to work:
pi = (static_cast <double> (pi * 10000) + .0005) / 10000;
it seems to work, and keeps the iterations down to 400. I am just not sure how it works, and why the .0005 is needed

so if anyone knows the answer and cares to explain, i am all ears.