Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Numerical Precision and Convergence

    For an approximation with a known leading error,

    Q(h)=Q∗+chp+O(hp+q),p,q>0,Q(h)=Q_*+c h^p+O(h^{p+q}),\qquad p,q>0,

    Richardson extrapolation removes that leading term:

    Qext(h)=2pQ(h/2)−Q(h)2p−1,Q(h/2)−Q∗≃Q(h)−Q(h/2)2p−1.Q_{\rm ext}(h)=\frac{2^pQ(h/2)-Q(h)}{2^p-1}, \qquad Q(h/2)-Q_*\simeq\frac{Q(h)-Q(h/2)}{2^p-1}.

    hh is the refined grid, step or cutoff parameter, and Q∗Q_* is the limit of the same problem. This assumes an asymptotic expansion with nonzero leading coefficient and other errors smaller than the term being fitted. At fixed finite volume, a→0a\to0 is not also an infinite-volume limit. Increasing floating-point precision is not a continuum extrapolation.

    Diagnose the observed order

    With three refinements, a nonvanishing leading power predicts

    Q(h)−Q(h/2)Q(h/2)−Q(h/4)⟶2p.\frac{Q(h)-Q(h/2)}{Q(h/2)-Q(h/4)}\longrightarrow2^p.

    The measured ratio estimates the order over the tested range of step sizes. Oscillatory errors, logarithms, changing boundary data, solver tolerances, and statistical noise can invalidate a one-power fit.

    For a concrete check, apply the centered derivative to f(x)=exf(x)=e^x at x=0x=0:

    D(h)=eh−e−h2h=1+h26+h4120+O(h6).D(h)=\frac{e^h-e^{-h}}{2h} =1+\frac{h^2}{6}+\frac{h^4}{120}+O(h^6).

    The extrapolated estimate (4D(h/2)−D(h))/3(4D(h/2)-D(h))/3 is 1−h4/480+O(h6)1-h^4/480+O(h^6). Before roundoff dominates, halving hh reduces the original error by about four and the extrapolated error by about sixteen. This checks both the cancellation coefficient and its remaining sign.

    Precision, cancellation and conditioning

    Roundoff and discretization compete. A difference quotient subtracts nearby computed values, so making hh arbitrarily small can amplify absolute evaluation errors by 1/h1/h. More digits extend the usable range; an algebraically stable formula can be better still. For example,

    1−cos⁡xx2=12[sin⁡(x/2)x/2]2⟶12.\frac{1-\cos x}{x^2} =\frac12\left[\frac{\sin(x/2)}{x/2}\right]^2 \longrightarrow\frac12.

    The right-hand expression avoids subtracting two numbers close to one. In binary64 arithmetic the direct expression can already round to zero at x=10−8x=10^{-8}, while the rewritten expression retains the limit. Precision should be increased before evaluating cancellation-prone intermediates; converting an already rounded result to a larger type cannot restore lost information.

    A small residual is also not always a small solution error. For Ax=bAx=b, define r=b−Ax~r=b-A\widetilde x. With a nonsingular matrix and a consistent norm,

    ∥x−x~∥∥x∥≤κ(A)∥r∥∥b∥,κ(A)=∥A∥ ∥A−1∥,\frac{\|x-\widetilde x\|}{\|x\|} \le\kappa(A)\frac{\|r\|}{\|b\|}, \qquad \kappa(A)=\|A\|\,\|A^{-1}\|,

    for b≠0b\ne0. A large condition number can turn a tiny relative residual into a weak accuracy guarantee.

    In a field-theory calculation, vary the controls that affect the claimed result: regulator size, volume, basis truncation, quadrature resolution, solver tolerance, arithmetic precision, and sampling length. Use exact symmetries, limiting cases or a differently organized calculation when available. Agreement of two implementations sharing the same approximation does not test that approximation.

    See high-precision optimization for cancellation and independently evaluated solver residuals, and the computational Library for quadrature and regulator examples.

    References

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.