The amplitude reaching a detector from the -th ring of a model diffraction pattern is…
PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics
Error, Chance and the Machine, Ch Rounding, backward error and the sensitivity of a computation
Problem
The amplitude reaching a detector from the i-th ring of a model diffraction pattern is Ai=1/i (dimensionless), and the N=2×105 ring amplitudes A1,…,AN are added in binary32 (u=5.96×10−8). The exact sum, from the harmonic-series asymptotic formula, is S=∑i=1NAi=12.7832908 to the precision quoted.
((a)) Added by a plain left-to-right (recursive) loop, the binary32 result is 12.7827568. Added by pairwise (cascade) summation, with adjacent pairs and a zero appended whenever a level has an odd count, the binary32 result is 12.7832947. State the absolute error of each.
((b)) Compute the recursive bound (N−1)u∑i∣Ai∣ and the pairwise bound ⌈log2N⌉u∑i∣Ai∣, using ∑i∣Ai∣=S since every term is positive.
((c)) Compare each measured error with its own bound, and state which order of summation has the tighter (more informative) guarantee.