Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • Meet DCRouter
  • Glossary
  • Part 0: What Verification Is8
  • Part 1: What Can Go Wrong11
  • Part 2: Specifications as Checkable Rules8
  • Part 3: Observability and Controllability7
  • Part 4: Stimulus11
  • Part 5: Checking11
  • Part 6: Coverage10
  • Part 7: Formal and Simulation10
  • Part 8: Verification Levels and Reuse8
  • Part 9: Planning and Risk9
  • Part 10: Emulation and Prototyping8
  • Part 11: Post-Silicon Validation8
  • Part 12: Bug Economics8
  • Part 13: Debug7
  • Part 14: Sign-Off7
  • Part 15: Verification in Context8
  • Part 16: Case Studies5
    • How to Read an Escape
    • The Pentium FDIV Bug
    • A Chipset Recall
    • Speculative Execution Attacks
    • Writing a Post-Mortem
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 16: Case Studies
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 16: Case Studies
  4. The Pentium FDIV Bug

Part 16 · Case Studies · Senior (S)

The Pentium FDIV Bug

In 1994 the Pentium's floating-point divider was found to return wrong quotients for rare operand pairs, because entries were missing from a lookup table. What is documented, how the error shows up, why rare triggers defeat random testing, and why a small fully specified structure is exactly where exhaustive checks and formal proof pay off; the change that followed in the industry.

On this page

    Note

    Level: Senior (S) · Answers: What can real projects teach us?

    Before this: How to Read an Escape

    In October 1994 Thomas Nicely, a professor of mathematics at Lynchburg College, found that his number-theory computations gave different answers on a Pentium than on other machines (fact C4). The cause was the processor's floating-point divider. It is the best-known escape in the industry, and one of the best documented.

    What does the FDIV bug teach about where exhaustive and formal checks pay off?

    What failed (documented)

    Fact

    Source

    The divider used the SRT algorithm, which picks each quotient digit from a lookup table indexed by bits of the partial remainder and divisor

    Edelman, SIAM Review 1997 (fact C1)

    Some table entries were missing, so for rare operand pairs the divider chose a wrong digit and the quotient was wrong

    Fact C1

    Intel attributed it to five entries omitted by a script error; a 2024 die analysis found 16 missing, five of which trigger the bug

    Fact C1

    Tim Coe's example: 4195835 / 3145727 returned 1.333739... instead of 1.333820...

    Fact C4

    Intel offered unconditional replacements in December 1994 and took a pre-tax charge of about $475 million in January 1995

    Fact C1

    Seeing the error

    Coe's operand pair, with the published flawed quotient, checked by multiplying back:

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    """The Pentium FDIV bug: Tim Coe's operand pair (fact C4), checked two ways.
    
    The flawed quotient below is the published value a flawed Pentium returned for
    4195835 / 3145727. The check multiplies back: x - (x / y) * y should be 0.
    """
    x, y = 4195835, 3145727
    correct = x / y
    flawed = 1.333739068902037589          # published result from a flawed Pentium
    print(f"correct quotient   {correct:.15f}")
    print(f"flawed quotient    {flawed:.15f}")
    print(f"relative error     {abs(flawed - correct) / correct:.1e}")
    print(f"x - (x/y)*y        correct {x - correct * y:.0f}, flawed {x - flawed * y:.0f}")
    assert x - correct * y == 0 and x - flawed * y == 256
    print("PASS: a one-line multiply-back check exposes the wrong quotient")

    It prints:

    Diagram
    correct quotient   1.333820449136241
    flawed quotient    1.333739068902038
    relative error     6.1e-05
    x - (x/y)*y        correct 0, flawed 256
    PASS: a one-line multiply-back check exposes the wrong quotient

    How to read it: the error is in the fifth significant digit, far larger than any rounding error, and a one-line check that multiplies the quotient back exposes it. Detection was never the problem once the right operands were used. The problem was reaching those operands.

    Why it got through (the course's reading)

    Rare triggers defeat random testing. If a random operand pair triggers a bug with probability p, the expected number of tests before the first hit, and the chance of missing it in N tests, are:

    E[tests to first hit]=p1​P(missed in N tests)=(1−p)N≈e−Np

    For a trigger that only a tiny fraction of operand pairs reach, even billions of random divisions can miss it. Lesson 4.5's long tail is the same arithmetic. And end-to-end tests of division exercise the table only indirectly, through whichever entries those operands happen to reach.

    The table itself, however, is small and completely specified: each entry is defined by inequalities on the partial remainder and divisor. That makes it an ideal target for checks that do not depend on reaching rare operands:

    • Exhaustive check of the table: compare every entry with its mathematical definition; a few thousand comparisons.

    • Exhaustive or formal check of the digit selection: prove that for every reachable partial remainder the chosen digit keeps the next remainder in range.

    • Formal proof of the whole algorithm: the approach the industry adopted afterwards (fact C7).

    The general lesson: where a structure is small and fully specified (tables, encoders, arithmetic units), check it completely rather than sample it. Random testing samples; exhaustive checking and formal proof cover.

    What changed afterwards (documented)

    Change

    Source

    A mechanically checked proof of the AMD K5 floating-point division algorithm

    Moore, Lynch and Kaufmann, 1998 (fact C7)

    Formal verification of divider circuits at Intel

    Kaivola and Aagaard, 2000 (fact C7)

    Formal verification replacing much of the simulation-based validation of the Core i7 execution engine

    Kaivola et al., CAV 2009 (fact C7)

    Floating-point units became one of the places where formal verification is now routine, which is lesson 7.5's point about where formal wins: small, well-specified, high-consequence blocks.

    Reading it through the course's questions

    Question

    Answer

    What failed?

    Rare wrong quotients from missing lookup-table entries (documented)

    Where could it have been caught?

    An exhaustive check of the table, or a formal proof of the division algorithm (the course's reading)

    Why was it not caught?

    Unreached: rare triggers in random and end-to-end testing (the course's reading); the documented cause of the omission is a script error

    What changed?

    Replacement, a $475 million charge, and formal verification of arithmetic as standard practice (documented)

    Why this matters

    Senior lens. Look for the small, fully specified structures in a design (tables, encoders, arithmetic) and check them completely, by exhaustive comparison or formal proof. Random testing is the wrong tool for a rare trigger in a structure you could simply enumerate.

    Interview

    Asked: "What does the Pentium FDIV bug teach verification engineers?"

    Weak answer: To test division more.

    Strong answer: The divider's SRT lookup table had missing entries, so rare operand pairs got wrong quotients; Intel attributed it to a script error. A multiply-back check exposes the error instantly, so detection wasn't the issue: reaching the rare operands was. Random testing misses a trigger of probability p with probability about e^(-Np). But the table is small and fully specified, so checking every entry against its definition, or proving the algorithm formally, would cover it completely. After FDIV, formal verification of dividers and floating-point units became standard, at AMD and Intel.

    Follow-ups: (1) Why does random testing miss rare triggers? (2) Where else in a design would you check exhaustively?

    Check yourself Why was detecting the FDIV error easy, but finding it hard?

    A simple multiply-back check shows the wrong quotient, but only for the rare operand pairs that reach the missing entries; random testing seldom reaches them.

    Check yourself Why is a lookup table a good target for exhaustive checking?

    It is small and each entry has a precise definition, so every entry can be compared with its definition in a few thousand checks, independent of how rarely operands reach it.

    Key takeaways

    • FDIV: missing lookup-table entries gave rare wrong quotients (documented).

    • Rare triggers defeat random testing; small fully specified structures should be checked completely.

    • Afterwards, formal verification of arithmetic units became standard practice.

    Keep going

    Next: Lesson 16.3, A Chipset Recall. A defect no functional test could see.

    Related topics

    • Part 16 overview: Case Studies

    Previous

    146 / 160

    Next: A Chipset Recall

    Up next

    Up nextA Chipset Recall

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Speculative Execution Attacks
    • Writing a Post-Mortem