On the other hand, the programmer can always set the floating-point control word to do 53-bit precision; this makes the in-register values have the same precision as the in-memory ones.
I don't understand why the article didn't mention this. It's a simple fix that gives consistent results regardless of the memory/register optimization.
Posted May 18, 2010 21:31 UTC (Tue) by dark (subscriber, #8483)
[Link]
This doesn't sound like a complete solution. I think you would also have to use 'double' everywhere and excise 'float' from all your code in order to get consistent results. Though it's probably still okay to use 'float' in arrays as long as you convert to 'double' for all calculations.