At some point, I'll learn CORDIC. But part of me doesn't want to because I don't want the magic ruined. Kinda like Rubik's cubes.
It feels like like a cheat code to calculate complex functions. Like, it shouldn't work at all.
According to @kenshirriff, the original 8087 uses CORDIC. With all the rounding bullshit that FP arith has to do it surprises me that it's a good fit.
But I also don't understand it well.
@cr1901 @kenshirriff CORDIC has no role in arithmetic, only trig functions. The x87 trig insns have always been useless for implementing decent trig functions. Slower & less accurate than the obvious implementations.
@dalias @kenshirriff Well, @steve deleted his hellsite acct, so context is missing.
https://x.com/cr1901/status/1601969347899133954
But according to my FF History, the correct way to do FP trig functions is arg reduce to +/-pi/4:
https://userpages.cs.umbc.edu/phatak/645/supl/Ng-ArgReduction.pdf
Then do a polynomial approx. Except I remember Steve saying the polynomial shouldn't be a Taylor series for some reason (slow convergence?).
@cr1901 @kenshirriff @steve Yes all that is basically correct.