TL;DR
Get monitors, keyboards and dev gear delivered free — and shop member deals
- Fast, free delivery on millions of items
- Access to Prime Big Deal Days deals on October 6–7
- Prime Video, Amazon Music and more included
A new reverse-engineering report on righto.com examines the Intel 8087’s die and microcode to reconstruct the algorithm behind its FPTAN tangent instruction. The analysis shows the 1980 chip combined CORDIC rotations with a polynomial approximation step rather than relying on CORDIC alone.
A new reverse-engineering analysis of Intel’s 1980 8087 floating-point coprocessor reconstructs the exact algorithm behind its tangent instruction, showing that the chip combined the classic CORDIC technique with a polynomial approximation to reach both high accuracy and high speed. The report, published by engineer Ken Shirriff on his righto.com blog, is based on microscope images of the chip’s silicon and a reading of its 1,648 micro-instructions stored in the microcode ROM.
Intel introduced the 8087 in 1980, and the chip made floating-point arithmetic far faster in the IBM PC and other systems built around the 8086. According to the report, the 8087 computed a tangent in roughly 90 microseconds, compared with about 13,000 microseconds for the same operation performed in software on the 8086 microprocessor — a speedup of more than two orders of magnitude.
To recover the algorithm, Shirriff physically opened a chip package with a chisel and photographed the die at high resolution with a microscope. The microcode ROM, which he describes as the large rectangular region in the center of the die, holds the 1,648 micro-instructions that control the chip. The bottom half of the die contains the datapath, the circuitry that performs floating-point calculations on 80-bit values. By mapping functional blocks — the exponent ROM, constant ROM, shifter, adder, register stack, and a 16-bit shift register that holds CORDIC status bits — he was able to trace how the tangent instruction, FPTAN, actually executes.
The key finding is that the 8087 did not use CORDIC alone. CORDIC, which dates to 1956, computes trigonometric functions using only shifts, additions and table lookups — no multiplication or division. Each iteration adds roughly one bit of accuracy. According to the report, the 8087 used CORDIC rotations to reduce the problem to a point not on the unit circle, which yields the tangent easily as the ratio Y/X, and then applied a polynomial approximation to refine the result. This hybrid approach, Shirriff writes, is how the chip obtained both high accuracy and high performance.
Why a 46-Year-Old Chip Algorithm Matters
The analysis matters on two levels. For historians of computing, it documents a concrete engineering decision from the era when floating-point hardware was new and expensive: Intel’s designers chose to blend two known techniques rather than follow either one in its textbook form. That detail was invisible until now because the algorithm existed only in silicon and microcode, not in public documentation at this level of detail.
For engineers, the report is a case study in hardware-driven algorithm design. CORDIC was attractive because it needs only a shifter and an adder, but pure CORDIC converges linearly — one bit per iteration. The 8087’s datapath, with its adder reused for multiplication and division in loops, gave designers the option of a polynomial refinement step. The result shows how the available silicon shaped the mathematical method, a tradeoff still relevant in embedded and accelerator design today.
CORDIC was developed in 1956 by engineer Jack Volder at Convair, according to the report. He was tasked with designing a digital computer to replace the analog navigation computer of the B-58 Hustler, the first bomber capable of Mach 2 flight. Analog computers could generate sines and cosines easily with electromechanical resolvers, but with limited accuracy; digital trigonometry was hard with the slow transistors of the era. Volder’s answer was CORDIC — “COordinate Rotation DIgital Computer” — which converts an angle into a vector whose coordinates provide the trig functions. The trick is to decompose the angle into a sequence of precomputed special angles, each of the form arctan(2-n), so that rotations reduce to additions and binary shifts.
CORDIC later spread widely, including into scientific calculators, many of which used a decimal variant of the algorithm. The 8087 itself became the architectural ancestor of the floating-point units built into later x86 processors.
Limits of the Die-Level Reconstruction
The reconstruction is based on one analyst’s reading of the chip’s circuitry and microcode, and the report presents it as an explanation derived from physical evidence rather than from Intel’s internal design documents. Performance figures such as the 90-microsecond tangent time are cited from the author’s references rather than newly measured. The report also focuses on FPTAN specifically; whether the same hybrid structure applies in full detail to the 8087’s other transcendental instructions, such as logarithms and exponentials, is not addressed in the material reviewed here.
More 8087 Instructions Under the Microscope
Shirriff indicates this is part of an ongoing series on the 8087, writing that he has “another article” on the chip. Readers can expect further instruction-level analyses of the 8087’s transcendental functions based on the same die images and microcode decoding. The high-resolution die photos and functional block maps published alongside the report also give other researchers the material to verify or extend the reconstruction.
Key Questions
What did the Intel 8087 do?
The 8087, introduced in 1980, was a floating-point coprocessor used alongside the Intel 8086 in the IBM PC and other systems. It made floating-point math far faster than software emulation, computing a tangent in about 90 microseconds versus roughly 13,000 microseconds on the 8086, according to the report.
What is CORDIC?
CORDIC (COordinate Rotation DIgital Computer) is an algorithm invented by Jack Volder in 1956 for the B-58 bomber’s navigation computer. It computes trigonometric functions using only shifts, additions and table lookups — no multiplication or division — which made it well suited to simple hardware.
What was the new finding about the 8087’s tangent instruction?
The reverse-engineering shows the FPTAN instruction used a hybrid approach: CORDIC rotations to reduce the problem, followed by a polynomial approximation to refine the result. Pure CORDIC was not used alone because its one-bit-per-iteration convergence was too slow for the chip’s accuracy and performance goals.
How was the algorithm reverse-engineered?
The author opened a chip package with a chisel, photographed the die under a microscope, and mapped the functional blocks of the datapath along with the 1,648 micro-instructions in the microcode ROM, tracing how the FPTAN instruction uses the shifter, adder, constant ROM and registers.
Why did the 8087 compute tangent instead of sine or cosine directly?
According to the report, CORDIC naturally produces the tangent as the ratio of a vector’s coordinates, even when the vector is not on the unit circle. Sine and cosine directly would require normalizing the vector, which is messier in simple hardware.
Source: hn
Fall Picks
fall essentials
As an affiliate, we earn on qualifying purchases.
