If you are really interested in approximating a cosine on the cheap with high precision, you should look into approximating polynomials.
The Taylor expansion produces approximating polynomials that aren't that good.
For instance, if you were to ask which degree-4 polynomial best approximates cos(x)?, you wouldn't end up with 1-x^2/2 + x^4/24.
In fact, this polynomial is 0.99958 - 0.496393 x^2 + 0.0372093 x^4; it pretty much coincides[2] with cos(x) on the interval (-π/2, π/2); the error is an order of magnitude smaller than with the Taylor polynomial (see [3] vs [4]).
How to do this? Linear algbera[1].
See, the polynomials form a Hilbert space (a vector space with an inner product), where a decent choice of one is
<f(x), g(x>) := \int_π/2^π/2 f(x)g(x) dx
This is Do Gramm-Schmidt on 1, x, x^2, ...; obtain an orthonormal basis, and use the inner product to compute a projection on the first
d elements to obtain a best degree-
d polynomial approximation. Voila!
Linear Algebra saves the day yet again.
[1]https://www.math.tamu.edu/~yvorobet/MATH304-503/Lect4-04web....
[2] https://www.wolframalpha.com/input/?i=plot+0.0372093+x%5E4+-...
[3]https://www.wolframalpha.com/input/?i=plot+abs%281-x%5E2%2F2...
[4]https://www.wolframalpha.com/input/?i=plot+abs%281-x%5E2%2F2...