Lets see...
I can get the cosine quickly for you too, it's also from the Taylor/McClorin series.
Cos(0) = 1
-sin(0) = 0
-cos(0) = -1
Sin(0) = 0
Okay, the series centered at zero:
1 - (1/2) x^2 + (1/24) x^4 - (1/6!) x^6...
Good enough.
We can move the center away from zero if we want to by applying the following:
1 - 1/2 (x - c)^2 + 1/24 (x - c)^4 - 1/6! (x - c)^6
Knowing the following, we can calculate any vale of the cosine without complex tricks:
cos(-θ) = cos θ, and cos (θ+π/2) = -cos θ
I have forgotten how to calculate the maximum error, but it seems pretty easy. I think you just integrate the next term back up to the constant term... something like that.
tanθ = sinθ / cosθ (I'll find this series later, it isn't as convenient and I don't remember the derivative of tangent and secent)
I can get the cosine quickly for you too, it's also from the Taylor/McClorin series.
Cos(0) = 1
-sin(0) = 0
-cos(0) = -1
Sin(0) = 0
Okay, the series centered at zero:
1 - (1/2) x^2 + (1/24) x^4 - (1/6!) x^6...
Good enough.
We can move the center away from zero if we want to by applying the following:
1 - 1/2 (x - c)^2 + 1/24 (x - c)^4 - 1/6! (x - c)^6
Knowing the following, we can calculate any vale of the cosine without complex tricks:
cos(-θ) = cos θ, and cos (θ+π/2) = -cos θ
I have forgotten how to calculate the maximum error, but it seems pretty easy. I think you just integrate the next term back up to the constant term... something like that.
tanθ = sinθ / cosθ (I'll find this series later, it isn't as convenient and I don't remember the derivative of tangent and secent)