wish: optimize (x > 0.) floating point comparison.

Richard Henderson rth@cygnus.com
Sat Sep 26 00:52:00 GMT 1998


On Sat, Sep 26, 1998 at 01:32:18AM -0400, N8TM@aol.com wrote:
> The same standard (extended double precision) was adopted by Motorola 6888[12]
> and Intel.  

Incorrect.  Motorola uses a 96-bit format with different precision.

> The 80-bit intermediate precision is sufficient in a number of documented
> cases to protect the accuracy of the final standard double precision result.

That's nice.  If you want to follow ISO and IEEE rules all calculations,
without exception, must be properly rounded.

> My results using CELEFUNT, for example, bear this out.

So technically you should have written that using an explicit long double. 
Or real*10 if g77 supported that.

> The rounding mode switch has been provided to enable 53-bit rounding mode,
> in case that is desired...

You miss the key point: to follow the rules, single precision operations
must also be properly rounded. 

So a strictly conforming compiler on x86 must either drop all intermediate
results to memory, or be continually reloading the fpcr.

> How did we stray so far from the original topic of this thread?

I have no idea.


r~



More information about the Gcc mailing list