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 Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Binary Counters: Design and Analysis → Binary Arithmetic → Fixed-Point Number Representation → Two's Complement Representation → Floating-Point Representation (IEEE 754) → Machine Epsilon and Unit Roundoff

Longest path: 84 steps · 339 total prerequisite topics

Prerequisites (1)

Leads To (3)