PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics
Scientific Computing for Physicists, Ch The numerical toolkit closed: backward error and the audit of a library routine
Problem
A calorimeter logs N=400000 individual heat-pulse readings, each recorded as exactly 0.05J. The total deposited energy is formed by a loop that adds the readings one at a time, in a fixed left-to-right order, in binary64 (double precision) arithmetic. Because every term is positive, the condition number of this sum with respect to relative perturbations of the terms is κ=1.
((a)) Using the recursive-summation bound ∣δieff∣≤(N−1)ϵmach/2 with ϵmach=2−52, compute the bound on the relative forward error of the total.
((b)) A comparison with an exactly rounded sum shows the loop's relative error is 7.5×10−12. State, with a reason, whether this is within the bound, and whether the discrepancy should be blamed on the algorithm or on the problem.