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

Machine Epsilon and Unit Roundoff

Graduate Depth 83 in the knowledge graph I know this Set as goal
14topics build on this
339prerequisites beneath it
See this on the map →
Floating-Point Representation (IEEE 754)Floating Point RepresentationRounding Errors and Error Propagation+1 more
machine-epsilon precision floating-point

Core Idea

Machine epsilon is the smallest positive number such that 1 + ε ≠ 1 in floating point arithmetic, quantifying the relative precision of a computer's number system. It determines the accuracy threshold for all numerical computations. For double-precision arithmetic, machine epsilon is approximately 2.22 × 10⁻¹⁶.

Explainer

From your study of floating-point representation, you know that real numbers are stored in a finite binary format — a sign bit, an exponent, and a significand (mantissa). Because the significand has a fixed number of bits, there is a finite gap between any floating-point number and its nearest neighbors. Machine epsilon (often written ε_mach or u for unit roundoff) is a precise way to characterize this gap near the number 1.

The definition is operational: ε_mach is the smallest positive floating-point number ε such that the computer evaluates 1 + ε as strictly greater than 1. In IEEE 754 double precision (64-bit), the significand has 52 explicit bits plus one implicit leading bit, giving 53 bits of precision. The spacing between 1.0 and the next representable double is exactly 2⁻⁵² ≈ 2.22 × 10⁻¹⁶. This is machine epsilon. For single precision (32-bit, 24-bit significand), it is 2⁻²³ ≈ 1.19 × 10⁻⁷.

The practical meaning is a bound on relative rounding error. When you round any real number x to the nearest floating-point number fl(x), the relative error satisfies |fl(x) − x|/|x| ≤ u, where u = ε_mach/2 is the unit roundoff. This means every stored number is accurate to about 15–16 significant decimal digits in double precision. It does not mean absolute error is small — for a number like 10¹⁵, the absolute rounding error can be as large as 0.1. The relative nature of machine epsilon is the key point: precision degrades for very large or very small magnitudes only through accumulated operations, not from a single rounding.

Why does this matter for numerical algorithms? Because errors compound. If a computation requires many arithmetic steps, rounding errors accumulate, and machine epsilon sets the floor on what accuracy you can expect. An algorithm that amplifies rounding errors dramatically — one that is numerically unstable — can lose all significant digits even when machine epsilon is tiny. Conversely, a backward-stable algorithm guarantees that the computed result is the exact answer to a slightly perturbed problem, with the perturbation bounded in terms of machine epsilon. Understanding ε_mach is therefore the foundation for analyzing whether an algorithm should be trusted: it tells you not just the precision of individual numbers, but the scale of the errors you need to track through every operation.

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 Roundoff

Longest path: 84 steps · 339 total prerequisite topics

Prerequisites (1)

Leads To (3)