in reply to OT: How much float precision needed for operation?

One approach that could work would be to do error analysis as if you were approximating an infinite series. This is often covered in a second-semester calculus course (in the US), or at least touched on. Its been many years since i've actually done anything like this, but it was the first approach that came to mind.

In general, the idea is that you determine an reasonable upper bound that including another term (or digit in your case, which can be considered a term) will modify your answer by.

I will introduce a non-standard notation here:

Let PI(n) denote an approximation of the constant PI, truncated after n decimal places.

For example if you're dealing with PI, and have some approximation that has 'n' decimal places (n digits after the decimal), you know that including the next digit will affect the value of PI as:

Error <= PI(n+1) - PI(n) < (1/10)^n

So if you consider PI^2, you can do set something up like this:

Error <= [ PI(n+1) - PI(n) ]^2 < ((1/10)^n)^2
I think that doing that analysis directly is not exactly how you want to proceed, but i can't remember exactly what to do.

When i get home from work i'll have my math books available, instead of only these computer books. If i find anything more concrete, i'll post it from home.

I guess i can include this. If you find a series error analysis technique, you could use this series for PI:

PI = sum( i = 0 .. INF ) (-1 ^ i) / (2 * i + 1)
although that converges extremely slowly, and there are other better series that i cant think of right now.

I use the most powerful debugger available: print!