|
|
|
|
|
by PaulHoule
1363 days ago
|
|
Yes and no. The Taylor expansion works out like sin θ = θ - θ³/₆ + θ⁵/₁₂₀ - θ⁷/₅₀₄₀ + ⋯
if θ is in radians. This is ideal for small θ but if you want to cover, say, 0<θ<2π you are more likely to use something likehttps://en.wikipedia.org/wiki/Chebyshev_polynomials which are optimized across the range. You could rewrite these just as easily to work in degrees as radians. One of the best ways to calculate sin and cos is CORDIC, https://en.wikipedia.org/wiki/CORDIC which is really based on turns, half-turns, quarter-turns and so forth. |
|
phi_n = atan(2^-n)
and then using an abbreviated sum formula where computing cos(theta + phi_n) depends only on sums and bitshifts.
The small-angle approximations sin(x) ≈ x and cos(x) ≈ 1-x^2/2 are the real killer feature of radians, though, because when you can deal with the loss of accuracy you get to avoid using any loops whatsoever. They're also fundamental to understanding simple physical systems like a pendulum.