Accuracy and error analysis (was Re: [Maxima] primes)



C Y wrote:

>
> 
> My thinking:
> 
> ....


> c)  When calculations are done using these quantities, there is a
> resultant uncertainty which can also (usually) be calculated, and as a
> result the answer has a definite number of significant figures, and any
> beyond those are meaningless.
> 

An example: You might think that a procedure to compute the
square root of a number,  say  1+d,   (d much smaller than 1)
would find a result that had a larger error. say 1+d'  with |d'| > |d|.

But in fact the square root should have a SMALLER error, more like
1+d/2.

(1+d/2)^2 =  1+d+  O(d^2 )..

If you run a newton iteration to compute square root, using interval
arithmetic, you will not get 1+d/2+..
You might get 1+2d or worse.

So the number of digits of accuracy does not follow simple calculations,
step by step.