Reverse-engineering the vintage Intel 8087's tangent algorithm: more than CORDIC
5 points by calvin
5 points by calvin
I always enjoy Ken's tangents.
Many years ago I was implementing the x87 transcendentals, and I was doing that entirely via polynomial approximation trying to exactly match the outputs - I had assumed it was purely polynomial based by that point, but if it wasn't that would explain my misery. Of course my implementation was entirely software and its questionable performance has been documented elsewhere.
Nowadays, Intel has libraries such as MKL (Math Kernel Library) and Short Vector Math Library (SVML) [...]. With these libraries, x87 operations and 80-bit floats are mostly obsolete.
The much more practical reasons for not using the x87 implementations is that they operate via reduction mod-pi and their accuracy craters. I believe most libc's had moved away from the x87 builtin implementations of all the transcendentals a loooong time ago. Less significantly that also cause double rounding if you're wanting fp64 of fp32 results.