12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

errors & uncertainties in computations 41Approximation Error|error|10 -910 -13Round Off ErrorN10 100Figure 2.2 A log-log plot of relative error versus the number of points used for a numericalintegration. The ordinate value of ≃10 −14 at the minimum indicates that ∼14 decimal placesof precision are obtained before round-off error begins to build up. Notice that while theround-off error does fluctuate, on the average it increases slowly.then, the smallest total error will be obtained if we can stop the calculation at theminimum near 10 −14 , that is, when ɛ approx ≃ ɛ ro .In realistic calculations you would not know the exact answer; after all, if youdid, then why would you bother with the computation? However, you may knowthe exact answer for a similar calculation, and you can use that similar calculationto perfect your numerical technique. Alternatively, now that you understand howthe total error in a computation behaves, you should be able to look at a table or,better yet, a graph (Figure 2.2) of your answer and deduce the manner in whichyour algorithm is converging. Specifically, at some point you should see that themantissa of the answer changes only in the less significant digits, with that placemoving further to the right of the decimal point as the calculation executes moresteps. Eventually, however, as the number of steps becomes even larger, round-offerror leads to a fluctuation in the less significant digits, with a gradual increase onthe average. It is best to quit the calculation before this occurs.Based upon this understanding, an approach to obtaining the best approximationis to deduce when your answer behaves like (2.29). To do that, we call A theexact answer and A(N) the computed answer after N steps. We assume that forlarge enough values of N, the approximation converges asA(N) ≃A+ αN β , (2.32)that is, that the round-off error term in (2.29) is still small. We then run our computerprogram with 2N steps, which should give a better answer, and use that answer toeliminate the unknown A:A(N) − A(2N) ≃ αN β . (2.33)−101<strong>COPYRIGHT</strong> <strong>2008</strong>, PRINCET O N UNIVE R S I T Y P R E S SEVALUATION COPY ONLY. NOT FOR USE IN COURSES.ALLpup_06.04 — <strong>2008</strong>/2/15 — Page 41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!