This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reporting bugs: there is nothing to gain in frustrating reporters


Laurent GUERBY wrote:
On Sat, 2005-06-18 at 17:37 -0400, Robert Dewar wrote:

Changing the default rounding of the processor will make code less
efficient?


Yes, if you have to change it backwards and forwards for float and
double


Quite rare. Only usage I've seen is for tabulation when you want
to save storage space but there it won't be an issue since you're
explicitely storing to memory.


... and if you insist on getting the range right as well as
the precision, then you have to do extra stores.


If you code run in extra range issue then you'll get "expected"
results on x86 and it will fail everywhere else, a nice
way to detect those issues indeed (and you won't face
this if you developped your code on non x86).

That's not right, your algorithm may expect infinities in certain ranges, handle them right, and blow up if they are not generated, and vice versa. IEEE = IEEE, not some approximation thereof.

Changing the rounding mode alone does not give what people call IEEE behavior.

I agree, but in 99.9% of the case it will do what people expect.
For the remaining 0.1% of the case, we're facing expert code and
experts can look into the magic manual and find the right flags/pragma/libraries/whatever :).

Right, but formal definition of what it means to be right 99.9% of the time is tricky. In practice, I would guess that gcc is right for most people 99.9% of the time as it is.

Anyway, default situation is unlikely to change, and x86_64 ABI
default to SSE2 plus it will soon be hard to find reasonably powerful
x86 only harware out there...

Right, though it is a tremendous advantage of the ia32 (and ia64) architectures that they *do* have efficient implementations of IEEE extended, which is rare on other processors.

Laurent





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]