This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Inline version [x86] of exp is buggy, exp(-Inf) should be zero.
- To: drepper at cygnus dot com, p dot dalgaard at biostat dot ku dot dk
- Subject: Re: Inline version [x86] of exp is buggy, exp(-Inf) should be zero.
- From: Mike Stump <mrs at windriver dot com>
- Date: Fri, 5 May 2000 01:51:48 -0700 (PDT)
- Cc: billm at melbpc dot org dot au, bug-gcc at gnu dot org, bug-glibc at gnu dot org, r-core at r-project dot org
> 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.