Re:Sin and Cos: The Programmer's Pals
by kevin_thibedeau on Tuesday March 06, 2018 @10:33AM
(#16529416)
CORDIC is cheap and fundamentally simpler than Taylor series since it works on the essential principal of unit circle rotations that the trigonometric functions derive from. It isn't just a close enough approximation.
Taylor series are slower than minimax polynomial approximations.
Here’s a C++ implementation of minimax approximations for some popular functions, with good license (boost): https://www.geometrictools.com/Source/Functions.html
I just couldn't wrap my head around the idea that you could simply calculate this using basic arithmetic operations.
One thing I learned from this experience was that these functions are expensive to calculate and it's actually pretty easy to write your own, faster but less precise implementation.