Minimum floating-point requirements
Rich Felker
dalias@aerifal.cx
Mon Feb 17 22:41:00 GMT 2014
On Mon, Feb 17, 2014 at 03:59:04PM -0600, Steve Munroe wrote:
> > Such as...? Basically everywhere of modern relevance it's either
> > equivalent to double or it's ld80 (which is a conforming IEEE extended
> > precision type).
> >
> If ld80 is IEEE it is after the fact. Otherwise why do we have:
>
> -ffloat-store
> Do not store floating-point variables in registers, and inhibit
> other options that might change whether a floating-point value is
> taken from a register or memory.
>
>
> This option prevents undesirable excess precision on machines such as
> the 68000 where the floating registers (of the 68881) keep more
> precision than a double is supposed to have. Similarly for the x86
> architecture. For most programs, the excess precision does only good,
> but a few programs rely on the precise definition of IEEE floating
> point. Use -ffloat-store for such programs, after modifying them to
> store all pertinent intermediate computations into variables.
The description of this option is outdated. It does not give
conforming behavior; it actually makes the behavior worse by
introducing double-rounding in places it shouldn't happen. The modern
replacement is -fexcess-precision=standard, which is default with
-std=c* and gives the ISO C mandated behavior for FLT_EVAL_METHOD!=0.
> And why do I keep find packages with -ffloat-store forced on? This is bad
> because PowerPC always had IEEE compliant double and this really hurts
> performance.
Ignorance most likely. The incorrect description above does not help.
Rich
More information about the Libc-alpha
mailing list