Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 24 by
bynun...@gmail.com: FIXMATH_FAST_SIN gives rounding error
http://code.google.com/p/libfixmath/issues/detail?id=24
I've found a bug with your fast implementation of sin() (FIXMATH_FAST_SIN),
this bug doesn't happen with the more accurate version.
I made an animation of a rotating cube but noticed it would shudder, i
tracked it down to the sin function providing very poor accuracy as the
return value from it reached and passed 0.
I'm running it in Visual Studio 2009 and tracking the values in the
debugger so the values i see are the 32bit number representation of the
fix16_t variable but they go like this...
1842, 899, -74, -1055, -2037, -2990, -3979, all good so far, then suddenly
it jumps back to positive with 4782, 3790, 2803, ... it then continues down
through to -65536 (-1.0) as it should do.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings