This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Minimum floating-point requirements
- From: Rich Felker <dalias at aerifal dot cx>
- To: Steve Munroe <sjmunroe at us dot ibm dot com>
- Cc: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>, David Edelsohn <dje dot gcc at gmail dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Mon, 17 Feb 2014 17:41:11 -0500
- Subject: Re: Minimum floating-point requirements
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnyn-Cj4Mw4efQTs2MYFHhknyskAEznEqpGeYnb9rY3X4hg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1402150136490 dot 31722 at digraph dot polyomino dot org dot uk> <CAGWvny=aJCdoQvC8q-dNvFdDNAqRCcZ7_adD=Sst8FDr0MN1Qg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1402151656510 dot 6358 at digraph dot polyomino dot org dot uk> <20140216045946 dot GG184 at brightrain dot aerifal dot cx> <CAGWvny=9Jeippop9xuERzwgWL8+QbZiqQFhgxGNdAW0C=EnOLQ at mail dot gmail dot com> <20140216214623 dot GI184 at brightrain dot aerifal dot cx> <OF6C3CF9D0 dot 7DE26AD8-ON86257C82 dot 006D70FA-86257C82 dot 006EF9D5 at us dot ibm dot com> <20140217203417 dot GN184 at brightrain dot aerifal dot cx> <OF3354A3EA dot DE2C3A55-ON86257C82 dot 007658A9-86257C82 dot 0078C3DE at us dot ibm dot com>
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