This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: FWD: FLOATING-POINT CONSISTENCY, -FFLOAT-STORE, AND X86
- To: toon at moene dot indiv dot nluug dot nl (Toon Moene)
- Subject: Re: FWD: FLOATING-POINT CONSISTENCY, -FFLOAT-STORE, AND X86
- From: Joe Buck <jbuck at Synopsys dot COM>
- Date: Tue, 15 Dec 98 12:55:41 PST
- Cc: egcs at cygnus dot com
> The last thing I need is to have egcs slowed down to a crawl by having
> it spill unaligned 80-bit temporaries for something that shouldn't be
> larger than 32 bits in the first place.
If egcs is going to spill temporaries, it's going to have to align them,
or yes, we will slow down to a crawl.
> Please make this and other "accuracy" options a "-pedantic-numerics"
> one.
I'm not worried about the last few bits of accuracy, I'm worried about
things like root-finding algorithms blowing up because the < operator
isn't transitive if intermediate results are spilled.
e.g. assume f(x) is continuous and its derivative is always positive,
that f(lo) is negative and f(hi) is positive, and we want to find the
root. A binary search approach may not be reliable, it may loop forever!
This is because the 80-bit version of lo may be less than the 80-bit
version of hi, while the 64-bit versions are equal. The current state
of affairs is that the compiler randomly gives some results 80 bits
of precision and some results less, and it may change this at any time,
at random.
Yes, for well-conditioned algorithms just putting the FPU into 32-bit
mode may be the best solution. But the current behavior has too many
surprises.