Convergence and precision of root-seeking programs

213 Views Asked by At
  1. How might I find a root-seeking program's "order of convergence"?

  2. For an iteration program, how might I examine the effect of the rounding-error? (If MATLAB displays the iterates to 4 d.p., does that mean it is working with that level of accuracy or does it work with more digits internally?)

Thanks.

1

There are 1 best solutions below

5
On
  1. You will need to find out which algorithm the program implements. The bisection method has a linear convergence, and Newton iterations has quadratic convergence.

  2. MATLAB works with normal 8 byte floating point numbers (double), which has precision down to about 16 decimals (or rather, exactly 52 decimals position in binary). In matlab, the function eps(x) will give you the smallest possible increment for the value x. The value displayed corresponds to an increment of the least significant decimal. Note that you cannot exactly describe even just 0.1 in binary, as you can try for yourself in MATLAB: fprintf('%.20e\n',0.1) will result in 1.00000000000000005551e-01 which is the closest binary representation.