Round-off error arises when numbers or arithmetic results are rounded to a finite set of representable values. Its scale is associated with machine epsilon, and its effects depend on subsequent operations. Even a formula with zero truncation error can lose information. In decimal arithmetic rounded to three significant digits, becomes and becomes : subtracting the stored numbers gives zero although the exact difference is . The subtraction exposes errors already present in its nearly equal operands.
This example also has a large condition number: independently perturbing the two inputs of can produce a relative amplification . High sensitivity belongs to the input-output problem; numerical stability concerns the arithmetic used to solve it. Conversely, on a common binary system with 53 significant bits and rounding to nearest, evaluates to zero while evaluates to one. Exact arithmetic makes both one: changing summation order changes the accumulated roundoff error. MIT's summation lecture explains why numerical stability and the condition number must be assessed separately.[ref]
https://ocw.mit.edu/courses/18-335j-introduction-to-numerical-methods-spring-2019/pages/week-2/. Steven G. Johnson, MIT 18.335J, Lecture 3: Floating-Point Summation and Backwards Stability, 2019
Near a smooth local minimum with and , Taylor's theorem givesIf evaluated function values have absolute uncertainty of order , differences on that scale cannot reliably identify smaller displacements than order . In ordinary floating-point arithmetic, when and evaluations have relative error of order , this becomesFor unit-scale values and curvature, this is the square root of machine epsilon, rather than machine epsilon itself. It explains why a derivative-free golden-section search can lose reliable comparisons while candidate positions remain representably different.[ref]
One dimensional minimization in the GNU Scientific Library manual. Caveats: loss of the quadratic term when added to a nonzero minimum value
This is a precision limit of the evaluated values, not an invariant property of the minimizer. Accurately subtracting a known constant, obtaining values at higher precision, or locating a zero of an accurately evaluated derivative can change the attainable position accuracy. A zero minimum with relative error controlled on its small values also needs separate analysis.
Subtracting nearly equal approximate quantities can lose significant digits because the absolute input errors become large relative to the small difference. For example, the positive polynomial root of can be evaluated as , avoiding the subtraction in when is small.
Articles by others on the same topic
Round-off error, also known as rounding error, refers to the difference between the true value of a number and its approximated value due to the limitations of numerical representation in computers or mathematical calculations. This type of error occurs when a number cannot be represented exactly in a finite number of digits, leading to rounding during calculations.