-
Notifications
You must be signed in to change notification settings - Fork 112
math: Sine and cosine accuracy #191
Copy link
Copy link
Open
Description
Hi,
When I try to test the sine and cosine implementations with inputs on [0, 2pi] rather than [-1, 1], they are only accurate to two or three decimal places.
I know people put in the effort and I don't want to be rude and mess with their code, but I would like to suggest two formulas which are more accurate and probably just as fast. They are polynomial approximations accurate to nine decimal places. The formulas are here: http://eliteraspberries.github.io/pal/formulas/
Polynomial approximations involve mainly floating-point multiplication and addition, which is good for modern hardware with a multiply-accumulate instruction.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels