Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 23 Dec 2012
Offline Last Active Apr 17 2013 05:34 AM

Topics I've Started

Fast sin and cos functions

08 January 2013 - 07:53 AM

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:




Two points:

  1. 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.
  2. Can you do better? Can a look up table beat this? Or can the code be optimised even more?