I was looking around for fast sin and cos functions, especially for calculating the two together using sse.
I found an old post on devmaster.net describing a fast approximation for sin, but the code was incomplete. So I took that and adapted it for sse intrinsics, adding a SinCos function so I could get the second one for free.
The code is here:
- Feel free to use it, though don't bother unless you have a pressing performance reason; the standard sin and cos functions are actually pretty good.
- Can you do better? Can a look up table beat this? Or can the code be optimised even more?