‹ BackHN Continuity

Thread

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

116 points · 11 comments · pwg

Loading the complete thread in the background. This saved snapshot is available now. Refresh

  1. kens · · focus · HN ↗
    Author here for your 8087 questions...
    1. WalterBright · · focus · HN ↗
      Thank you! Amazing work! I've always had a soft spot for the 8087.

      Maybe implement the algorithm in C? Thank would be fun!

    2. jacquesm · · focus · HN ↗
      Weitek next?
      1. kens · · focus · HN ↗
        The 8087 is probably enough floating point for a while :-)
        1. jacquesm · · focus · HN ↗
          That's an interesting chip though, but probably also much more challenging.
    3. tremon · · focus · HN ↗
      How did you determine the contents of the microcode ROM? I get using a microscope to examine the chip layout, but the ROM contents remain opaque no matter how far you zoom in. Has the 8087 microcode been published/annotated by Intel, or did you have to use a ROM reader and then interpret the instructions yourself?
  2. jaygreco · · focus · HN ↗
    Love these deep dives. It’s fascinating to see how real, low-level engineering we all take for granted today unfolded. It’s incredible that the rough equivalent of an entire 160lb digital computer was built and baked into silicon.

    Also incredible reverse engineering. In a time when seemingly all appreciation for expertise is gone it’s so refreshing to see.

  3. drob518 · · focus · HN ↗
    The combination of numerical methods and low-level hardware is fascinating. Those 20th century engineers were both smart and creative.
  4. cmovq · · focus · HN ↗
    Always thought it was strange that fptan also pushes 1 to the register stack. It now makes sense it’s so existing code for the 8087 which was expected to do y/x to get the actual tangent could keep working by doing y/1 on newer processors.
  5. kelvo_ran · · focus · HN ↗

    [dead]

  6. heronbank · · focus · HN ↗
    Always fascinated by the low-level cleverness in early hardware. It's a different world from today's abundant resources.
  7. irfan_99 · · focus · HN ↗
    its cool to do RE
  8. Const-me · · focus · HN ↗
    I remember I once wanted to compute tangent of fp64 vectors. Here’s what I did.

    <a href="https:&#x2F;&#x2F;github.com&#x2F;Const-me&#x2F;AvxMath&#x2F;blob&#x2F;master&#x2F;AvxMath&#x2F;AvxMathTrig.cpp#L306-L342" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Const-me&#x2F;AvxMath&#x2F;blob&#x2F;master&#x2F;AvxMath&#x2F;AvxM...

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.