The Intel 8087, released in 1980, was the first floating‑point coprocessor for the IBM PC, offering hardware acceleration for transcendental functions that previously required slow software routines on the 8086 microprocessor. Ken Shirriff’s die‑level reverse‑engineering of the 8087 shows that its FPTAN instruction does not rely on a single method such as pure CORDIC or a polynomial series. Instead, the chip combines a 16‑stage CORDIC rotation with a simple Padé approximant to achieve both high speed and the 64‑bit accuracy required for floating‑point tangent.
The algorithm proceeds in three phases. First, a pseudo‑division step compares the input angle to a table of special angles αₙ = arctan(2⁻ⁿ); when the stored angle is smaller than the current remainder, a 1 is recorded and the angle is reduced, otherwise a 0 is recorded. This yields a 16‑bit decision vector without performing any rotations. Second, the tiny residual angle (less than 2⁻¹⁶) is fed into the Padé approximant 3x/(3‑x²); the chip treats the numerator as the initial Y coordinate and the denominator as the initial X coordinate, thus avoiding the costly division inherent in the rational formula. Third, a pseudo‑multiplication step applies the recorded CORDIC rotations in reverse order to that initial vector using only shifts, adds and subtracts in the datapath’s shifter and adder units, producing the final X and Y values.

This graph illustrates the Padé approximant used in the second phase of the 8087's FPTAN algorithm to compute tangent with high accuracy.

This diagram corresponds to the first phase described in the article, where the input angle is reduced using a table of special angles to produce a decision vector for later CORDIC rotations.

This illustration matches the third phase of the algorithm, where the residual angle is rotated back to produce the final X and Y values representing the tangent.

This photograph shows the hardware units mentioned in the article that carry out the shift‑and‑add operations of the pseudo‑multiplication stage.
The resulting X and Y (the partial tangent) are left on the 8087’s register stack; the FPTAN instruction does not perform the final Y⁄X division, which allowed existing software that expected to do the division itself to remain compatible with later processors. Shirriff reports that the hybrid method computes a tangent in about 90 µs, compared with roughly 13 000 µs for the same operation in software on the 8086, while noting that the error bound of below 2⁻⁶⁴ follows from his mathematical analysis of the Padé approximant rather than independent verification.