# fast sin and cos calculations for fixed point

This topic is 4927 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm using fixed point math to do my calculations in my game. I want to know whether sin and cos calculations can be done in a fast manner using fixed point. I'm using bitwise operations for my powers of 2 operations. Can someone suggest a faster way to calculate fixed point sine and cos calculations?

##### Share on other sites
Look up tables are quick if you don't need really exact answers. Otherwise you could use the second or third order taylor series. They might be quicker to compute.

##### Share on other sites
Lookup tables, possibly combined with interpolation, perhaps?
What do you need them for? There are fast methods to calculate consecutive values for example (for things like waveform generation).

##### Share on other sites
I thought of look up tables. But I'm going to use it for mobile games development where fixed point math is used. So there is a memory constraint. I'll check up Taylor's equations.

##### Share on other sites
Quote:
 Original post by sriniatigI thought of look up tables. But I'm going to use it for mobile games development where fixed point math is used. So there is a memory constraint. I'll check up Taylor's equations.

Note: Taylor series are fine if you want to approximate functions only near a specific point. If you want to approximate functions over points throughout an interval, Taylor series will start to suck.

In that case you'll want to do something like a least-squares approx to your function, or use some set of orthogonal polynomials (Chebyshev, Legendre, etc). They all have their high points, depending on the nature of the approximation you need.

1. 1
Rutin
73
2. 2
3. 3
4. 4
5. 5

• 21
• 10
• 33
• 20
• 9
• ### Forum Statistics

• Total Topics
633427
• Total Posts
3011818
• ### Who's Online (See full list)

There are no registered users currently online

×