Home | Notifications | New Note | Local | Federated | Search | Logout
Note Detail
Reply to @kenshirriff@oldbytes.space
Ken Shirriff@kenshirriff@oldbytes.space (2026-09-27 02:03:52)
Usually, rotating a vector by an angle requires complicated math. But for some special angles, the calculation requires just shifts and adds, easy to do in hardware. The CORDIC algorithm breaks down an angle into special angles (using a table), does quick vector rotations, producing the trig answer.
---Reply---
Ken Shirriff@kenshirriff@oldbytes.space (2026-09-27 02:04:21)
CORDIC became popular, especially in scientific calculators. The 8087 chip uses CORDIC, but goes further, also using a polynomial ratio to get more accuracy. The simple function 3x/(3-x^2) (blue) is surprisingly close to the tangent (red), better than a Taylor series (green).
---Attachments---
image: https://assets.oldbytes.space/assets.oldbytes.space/media_attachments/files/117/338/422/907/310/576/original/3f2be8617d07a876.png
Reply
---Replies---
Ken Shirriff@kenshirriff@oldbytes.space (2026-09-27 02:05:06)
The 8087 chip implements its algorithms in microcode, specialized low-level code inside the chip. By examining the microcode ROM under a microscope, the Opcode Collective extracted the bits and I reverse-engineered the algorithm.
---Attachments---
image: https://assets.oldbytes.space/assets.oldbytes.space/media_attachments/files/117/338/425/014/611/055/original/5ce63607afd9ba14.png
image: https://assets.oldbytes.space/assets.oldbytes.space/media_attachments/files/117/338/426/271/805/716/original/59e1d6ad620678a6.png