Thread: Stuck on Pi...
View Single Post
Old 02-22-2005, 12:05 AM   #3 (permalink)
See Plus Plus
 
Junior Techie

Join Date: Oct 2004

Posts: 63

See Plus Plus

Default

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.
__________________
I hate Pi
See Plus Plus is offline