Inline version [x86] of exp is buggy, exp(-Inf) should be zero.

Tim Prince tprince@computer.org
Fri May 5 07:51:00 GMT 2000


If you are continuing to dump both needed optimizations and
known buggy behaviors into -ffast-math, does this mean that this
option will never be supported to the extent of running test
suites or fixing bugs?  The penalty for doing things mostly
right in mathinline.h is small when used in conjunction
with -ffast-math, but that is not a good option now with
gcc-2.96, with all the additional compiler bugs which that
option provokes.

----- Original Message -----
From: "Mike Stump" <mrs@windriver.com>
To: <drepper@cygnus.com>; <p.dalgaard@biostat.ku.dk>
Cc: <billm@melbpc.org.au>; <bug-gcc@gnu.org>;
<bug-glibc@gnu.org>; <r-core@r-project.org>
Sent: Friday, May 05, 2000 1:51 AM
Subject: Re: Inline version [x86] of exp is buggy, exp(-Inf)
should be zero.


> > To: drepper@cygnus.com (Ulrich Drepper)
> > From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
> > Date: 05 May 2000 09:41:11 +0200
>
> > > The inline versions of the math functions are known to not
provide
> > > the correct results in all cases.
>
> > This is quite shocking! If that is your attitude to inline
> > functions, I do not think they have any business being
included at
> > compiler levels below -O3 and they are getting turned on
already at
> > -O.
>
> > [Cc-ed to bug-gcc in case they want to change the definition
of
> > optimizer levels]
>
> The -O flags are never used to perform semantic selections
that differ
> from mandated behaviors.  Some compilers (I mean other than
gcc) in
> the past may have done this, but they were wrong.
 The -ffast-math
> option is exactly the right way.  -mieee might also be taken
as hint
> on how to compute things.



More information about the Gcc-bugs mailing list