Hasty Briefsbeta

Bilingual

Reverse-engineering the Intel 8087's tangent algorithm: more than CORDIC

9 hours ago
  • Intel’s 8087 floating-point chip (1980) massively accelerated floating-point operations for the IBM PC, with tangent computing in 90 µs vs. 13,000 µs on the 8086.
  • The 8087’s FPTAN instruction uses a hybrid algorithm: CORDIC (Coordinate Rotation Digital Computer) for 16-bit accuracy, then a Padé rational polynomial approximation (3x/(3-x²)) for the remaining tiny angle to achieve 64-bit precision.
  • The algorithm has three phases: pseudo-division to determine which special CORDIC angles to apply, rational approximation for the residual angle, and pseudo-multiplication to apply the rotations in reverse order to minimize rounding error.
  • The 8087 returns partial tangent values (X and Y coordinates) instead of performing division, optimizing speed and allowing programmer flexibility.
  • Key hardware includes a 64-bit datapath, constant ROM with CORDIC angles, a shifter, adder, and a 16-bit shift register to store decision bits for rotations.