Here is a game developer’s view of the vagaries of floating point arithmetic.
Related posts:
Five tips for floating point programming
Overflow and loss of precision
The blog of John D. Cook
Here is a game developer’s view of the vagaries of floating point arithmetic.
Related posts:
Five tips for floating point programming
Overflow and loss of precision
{ 1 comment… read it below or add one }
Mike Garrett 03.27.09 at 13:22
Audio software also has problems with floating point. Most audio software treats audio samples as floating point values where 0dBFS = 1.0. Silence = 0.0 (or as close to it as possible). Audio processing on silence can easily create values that are in the denormal range, which can cause an exception and the value is calculated in the C library instead of the CPU itself. The result is a sudden huge CPU utilization spike when your audio software is processing silence. The solution is usually to bias your silence with a tiny DC offset.