2
$\begingroup$
  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.

  • 0
    Welcome to math.sx! You should try to write a more descriptive title. As for matlabs display of numbers, you can change it with `format long` or with `fprintf` if that's what you mean2011-09-05

1 Answers 1

2
  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.

  • 1
    I would even say that these root-finders are "self-correcting": if you are within a "basin of convergence", the convergence rate follows the rate expected of it up until you're near the precision of your system.2011-09-05