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

42 pointsposted 10 hours ago
by pwg

7 Comments

cmovq

2 hours ago

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.

kens

10 hours ago

Author here for your 8087 questions...

WalterBright

4 hours ago

Thank you! Amazing work! I've always had a soft spot for the 8087.

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

jacquesm

2 hours ago

Weitek next?

kens

39 minutes ago

The 8087 is probably enough floating point for a while :-)

jaygreco

6 hours ago

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.

drob518

2 hours ago

The combination of numerical methods and low-level hardware is fascinating. Those 20th century engineers were both smart and creative.