|
|
Subscribe / Log in / New account

What's new in GCC 4.5?

What's new in GCC 4.5?

Posted May 13, 2010 10:09 UTC (Thu) by mpr22 (subscriber, #60784)
In reply to: What's new in GCC 4.5? by creemj
Parent article: What's new in GCC 4.5?

x86 is fundamentally a big bag of hacks and kludges. Glaring deficiencies are never surprising.


to post comments

What's new in GCC 4.5?

Posted May 17, 2010 6:19 UTC (Mon) by cph (guest, #1433) [Link] (1 responses)

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.

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