A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Rounding Errors and Error Propagation

Graduate Depth 85 in the knowledge graph I know this Set as goal
12topics build on this
341prerequisites beneath it
See this on the map →
Floating Point RepresentationMachine Epsilon and Unit Roundoff+1 moreCatastrophic CancellationNumerical Differentiation
rounding error propagation

Core Idea

Every floating point operation introduces rounding error bounded by machine epsilon times the result's magnitude. As operations are chained, these errors accumulate unpredictably. Understanding error propagation through algorithms is essential for predicting and controlling overall numerical accuracy.

Explainer

You've learned that machine epsilon (ε_mach) is the smallest positive number such that 1 + ε_mach ≠ 1 in floating-point arithmetic — it measures the granularity of the number system. Every time you perform a floating-point operation like addition or multiplication, the result must be rounded to the nearest representable number. The rounding error introduced by a single operation is bounded by ε_mach × |result|, which is tiny on its own. The challenge is that algorithms chain thousands or millions of such operations, and these small errors accumulate.

Error propagation asks: if the inputs to a computation have small errors, how large are the errors in the output? For a function f(x), the absolute error in the output is approximately |f'(x)| × |Δx|, where Δx is the error in x. The relative error in the output is approximately |f'(x)| × |x/f(x)| × (relative error in x). The factor |f'(x)| × |x/f(x)| is the condition number of the function — it measures how much relative error is amplified. A condition number near 1 is benign; a large condition number means the function is ill-conditioned and tiny input errors explode into large output errors.

In multi-step algorithms, rounding errors accumulate through two distinct mechanisms. Forward error analysis tracks how errors introduced at each step propagate to the final result — it bounds the total error by summing contributions from each operation. Backward error analysis (Wilkinson's key insight) asks instead: for what slightly perturbed input would the algorithm have produced this exact output? If the backward error is small (of order ε_mach), the algorithm is numerically stable, even if the forward errors look alarming. Stable algorithms give the right answer to a nearby problem; unstable ones don't even achieve that.

A concrete example: summing n numbers in sequence accumulates O(n ε_mach) relative error. For n = 10⁶ and ε_mach ≈ 10⁻¹⁶, this gives relative error of about 10⁻¹⁰ — still small. But if some numbers nearly cancel (like summing 1.0000001 − 1.0000000), catastrophic cancellation can amplify the relative error dramatically, since you subtract two nearly equal quantities and the leading significant digits vanish, leaving only the rounded residue. This is why the order of operations matters in floating-point arithmetic, and why numerical analysts sometimes reformulate algebraically equivalent expressions to avoid cancellation.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticFixed-Point Number RepresentationTwo's Complement RepresentationFloating-Point Representation (IEEE 754)Machine Epsilon and Unit RoundoffFloating Point RepresentationRounding Errors and Error Propagation

Longest path: 86 steps · 341 total prerequisite topics

Prerequisites (3)

Leads To (2)