Advertisement
Home›Topics›The Pentium FDIV Bug
SILICON POST-MORTEM · HARDWARE ARITHMETIC

The $475M Division Bug:
Inside the Pentium FDIV Defect

By EcrioniX Research · 26 Oct 2026 · ~9 min read

In October 1994, Dr. Thomas Nicely, a mathematics professor in Virginia, noticed something bizarre while calculating twin primes on a brand new Intel Pentium computer: division was giving the wrong answer. A flaw in silicon meant \(4,195,835 / 3,145,727\) produced \(1.333739\) instead of \(1.333820\). That single hardware error ended up costing Intel $475,000,000 — all because of 5 missing numbers in a silicon lookup table.

⚡ Interactive Pentium FDIV Bug Simulator
STATUS: FPU ACTIVE
Prof. Nicely's Twin Prime (Bug Trigger) Clean Division (100 / 3) Secondary Defect Pair (5505001 / 294911)
True IEEE-754 Result (Correct FPU)
1.333820449136241
Exact mathematical quotient
1994 Pentium Silicon Output (Buggy FDIV)
1.333739068902037
Result generated by defective PLA table
Precision Discrepancy (|Δ|)
0.000081380234204
Discrepancy hits at 5th decimal place!
💥
PENTIUM HARDWARE BUG TRIGGERED!
During SRT Radix-4 division, the partial remainder landed on one of the 5 missing PLA cells. The CPU selected quotient digit 0 instead of +2, failing to subtract the divisor!

1. The Discovery: Twin Primes in Lynchburg, Virginia

Dr. Thomas Nicely was computing Brun's constant — the sum of the reciprocals of all twin primes:

B = (1/3 + 1/5) + (1/5 + 1/7) + (1/11 + 1/13) + ...

To verify his calculations, he ran the code across multiple computers: 486DX, 386, and a brand-new 66 MHz Pentium machine. The 486 and 386 agreed to 19 decimal places. The Pentium diverged at the fifth decimal place.

Dr. Nicely spent six months ruling out software bugs, memory errors, compiler flags, and motherboard defects. Finally, he isolated the simplest possible reproducible expression:

4,195,835.0 / 3,145,727.0 • Correct Math: 1.333820449136241002... • Pentium Output: 1.333739068902037589... ↑ Error starts at 5th decimal digit!
When you multiply the Pentium's quotient back: \(4195835 - (4195835 / 3145727) \times 3145727 = 256.0\) instead of zero!

2. The Silicon Hardware: How SRT Radix-4 Division Works

Why did Intel design the division unit this way? To understand the bug, you must understand how silicon calculates division.

The Old Way: Shift-and-Subtract (1 bit per cycle)

In standard long division, hardware guesses 1 quotient bit per cycle: compare divisor to remainder, subtract if it fits, shift. For a 64-bit double, this requires 60+ clock cycles — agonizingly slow for 3D graphics and engineering simulations.

The Fast Way: SRT Radix-4 Division (2 bits per cycle)

The Pentium introduced a high-speed SRT Radix-4 division engine (named after Sweeney, Robertson, and Tocher). By computing in Base-4, it generated 2 quotient bits per cycle, cutting division time down to just ~19 cycles!

In Radix-4, the quotient digit \(q_i\) is chosen from a redundant digit set:

qi ∈ {-2, -1, 0, +1, +2}
Partial Remainder (4r) Shifted left by 2 bits PLA LOOKUP TABLE 2,048 theoretical entries 1,066 valid silicon states ⚠ 5 MISSING ENTRIES Defaulted to ZERO in silicon! 7 bits (r) 5 bits (d) Quotient Digit qi Picked {-2, -1, 0, 1, 2}
The SRT hardware loop: In every cycle, 7 bits of the remainder and 5 bits of the divisor address a PLA lookup table to pick the next 2 bits of the quotient.

3. The Root Cause: An Off-By-One C Compiler Script

To implement the quotient selection logic in silicon, Intel mapped the mathematical Robertson diagram into a Programmable Logic Array (PLA). Out of the 2,048 possible input combinations, only 1,066 combinations were mathematically reachable.

A software engineer wrote a simple C script to download the mathematical table entries into the silicon mask layout file. The script contained an off-by-one loop error:

The Infamous Script Loop Bug (Conceptualized)

// A C loop copied table entries into the silicon PLA bitmask:
// Due to an off-by-one array index boundary, the loop halted early:

for (int row = 0; row < 1061; row++) {  // ❌ SHOULD HAVE BEEN 1066!
    write_pla_row(row, srt_table[row]);
}

// Exactly FIVE entries at the boundary were never written!

Because the C script stopped at row 1,061 instead of 1,066, exactly 5 entries were never written into the silicon mask.

THE 5 MISSING PLA CELLS (DIVISOR BOUNDARY d ≈ 1.444) OUTPUT = 0 INSTEAD OF +2
+2
+2
+1
+1
0
-1
-2
+2
+2
0
0
0
0
0
+1
-1

Why Did It Return Zero Instead of Crashing?

In physical CMOS transistor logic, an unprogrammed bit cell in a PLA defaults to logic 0 (Ground). So when a calculation hit one of the 5 missing entries, the CPU didn't halt or throw an exception. It quietly selected quotient digit \(q_i = 0\) instead of \(+2\).

Because it selected \(0\), the hardware failed to subtract \(2 \times \text{divisor}\) from the remainder. The partial remainder grew out of bounds, poisoning all remaining 50+ bits of the division calculation!

Advertisement

4. The PR Disaster & The $475 Million Recall

When Dr. Nicely posted his findings to the comp.sys.intel Usenet forum on October 30, 1994, Intel initially tried to downplay the issue:

Intel's Initial Defense

"An error only occurs once in 9 billion random floating-point divisions. The average spreadsheet user would only encounter it once every 27,000 years."

The engineering community was furious. A researcher named Tim Coe reverse-engineered the exact PLA table and proved that in engineering, CAD, financial modeling, and scientific simulations, certain iterative algorithms hit the vulnerable entries repeatedly.

On December 12, 1994, IBM dropped a bombshell: it halted all shipments of Pentium-based personal computers worldwide. Intel's stock cratered.

On December 20, 1994, Intel CEO Andy Grove surrendered and announced an unconditional, no-questions-asked replacement policy for all Pentium chips. Intel took a $475 million pre-tax charge against its earnings — roughly half of its entire profit for the fourth quarter of 1994 (equivalent to over $1 Billion today).

5. How the Bug Forever Changed Semiconductor Design

Unlike software, where a bug can be patched with an overnight over-the-air update, silicon is physical. Once a billion transistors are etched in glass and silicon, there is no "Ctrl+Z".

The FDIV disaster permanently altered the VLSI engineering landscape in three massive ways:

1. FORMAL VERIFICATION Mathematical proof of logic. Replaced random testing with Symbolic Model Checking. 100% state coverage! 2. HARDWARE MICROCODE Patchable silicon. CPUs now include patchable SRAM microcode RAM to fix bugs via BIOS updates. 3. SVA ASSERTIONS Silicon boundary assertions. SystemVerilog Assertions (SVA) verify every single table entry during pre-silicon RTL sim.
The three pillars born from the FDIV bug: Formal Equivalence Checking, Patchable Microcode, and Comprehensive RTL Boundary Assertions.

Modern RTL Defense: SystemVerilog Boundary Assertion

// In modern ASIC design, table completeness is formally proven:
property p_srt_lookup_complete;
  @(posedge clk) disable iff (!rst_n)
  (fdiv_state == STATE_QUOTIENT_SELECT) |-> 
    !$isunknown(pla_table_out[quotient_index]);
endproperty

assert_srt_no_unwritten_cells: assert property(p_srt_lookup_complete)
  else $fatal(1, "FORMAL FAULT: Unmapped cell accessed in SRT division PLA!");

6. Frequently Asked Questions

Q: Can modern CPUs have division bugs like the Pentium FDIV?

Modern CPUs are verified using Formal Verification Tools (like Cadence JasperGold and Synopsys VC Formal). Instead of testing random division vectors, formal tools use mathematical solvers to prove that the RTL circuit matches an ideal mathematical specification for every single one of the \(2^{128}\) possible input combinations.

Q: What did Intel do with the millions of returned Pentium chips?

Intel recycled thousands of returned processors into keychains and novelty desk ornaments with the inscription: "Bad chips made into good keychains." Some were also repurposed into non-floating-point embedded products where the FPU was physically disabled.

Q: How can I tell if a division pair will trigger the Pentium bug?

The bug triggers when the partial remainder \(r\) and divisor \(d\) fall into specific ranges (specifically where the scaled divisor is close to \(1.444\) and the remainder lands in the top boundary of row 1,061..1,065). In binary, these are values where the divisor has bit patterns with many repeating ones (e.g. \(3,145,727 = 0010\ 1111\ 1111\ 1111\ 1111\ 1111_2\)).

Advertisement