This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: wish: optimize (x > 0.) floating point comparison.
- To: rth at cygnus dot com, branko dot cibej at hermes dot si
- Subject: Re: wish: optimize (x > 0.) floating point comparison.
- From: N8TM at aol dot com
- Date: Sat, 26 Sep 1998 01:32:18 EDT
- Cc: rlk at tiac dot net, yotam_medini at avanticorp dot com, egcs at cygnus dot com
In a message dated 9/25/98 7:56:20 AM Pacific Daylight Time, rth@cygnus.com
writes:
> the 80-bit float format used is
> > an IEEE standard, as far as I know.
>
> Well, if you consider a standard used by exactly one machine "standard"...
>
The same standard (extended double precision) was adopted by Motorola 6888[12]
and Intel.
> > And what's wrong with having 80-bit
> > long doubles instead of 128-bit ones?
>
> No, what's wrong is that it is impossible to get intermediate results
> properly rounded without sacrificing all performance.
The 80-bit intermediate precision is sufficient in a number of documented
cases to protect the accuracy of the final standard double precision result.
My results using CELEFUNT, for example, bear this out. Using 128-bit
intermediate results will achieve this with a far greater loss of performance.
The rounding mode switch has been provided to enable 53-bit rounding mode, in
case that is desired, with a significant increase in speed of division and
sqrt(). It's true that changing the rounding mode consumes quit a bit of
time, but in practice that's more of a problem for integer truncation and for
Fortran ANINT() and NINT(), where the Fortran and IEEE standards are at odds.
How did we stray so far from the original topic of this thread?