|
|
Subscribe / Log in / New account

What's new in GCC 4.5?

What's new in GCC 4.5?

Posted May 17, 2010 6:19 UTC (Mon) by cph (guest, #1433)
In reply to: What's new in GCC 4.5? by mpr22
Parent article: What's new in GCC 4.5?

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.


to post comments

What's new in GCC 4.5?

Posted May 18, 2010 21:31 UTC (Tue) by dark (guest, #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.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds