If you have a lookup table:
sin(α+-β) = sin(α) cos(β) +- sin(β) cos(α)
cos(α+-β) = cos(α) cos(β) -+ sin(α) sin(β)
sin(2θ) = 2sin(θ) cos(θ)
cos(2θ) = cos^2(θ) - sin^2(θ) = 2cos^2(θ) - 1 = 1 - 2sin^2(θ)
With +- indicating the plus or minus operation and -+ indicating minus of plus. Note on cosine you subtract when adding angles and vice versa.
Now, a lookup table may not actually be faster than this because the table system has to figure out how input angle φ decomposes into α and β. This speed difference is especially true for cosθ approximations, you just square the number, shift down 1, negate, and carry a 1 in.
The maximum error for the sine function is (1/24) x^4
The maximum error for the cosine function (using 1 - 1/2 x^2) is 1/6 (x - c)^3
sin(α+-β) = sin(α) cos(β) +- sin(β) cos(α)
cos(α+-β) = cos(α) cos(β) -+ sin(α) sin(β)
sin(2θ) = 2sin(θ) cos(θ)
cos(2θ) = cos^2(θ) - sin^2(θ) = 2cos^2(θ) - 1 = 1 - 2sin^2(θ)
With +- indicating the plus or minus operation and -+ indicating minus of plus. Note on cosine you subtract when adding angles and vice versa.
Now, a lookup table may not actually be faster than this because the table system has to figure out how input angle φ decomposes into α and β. This speed difference is especially true for cosθ approximations, you just square the number, shift down 1, negate, and carry a 1 in.
The maximum error for the sine function is (1/24) x^4
The maximum error for the cosine function (using 1 - 1/2 x^2) is 1/6 (x - c)^3