This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



Mike Stump said:
> The -O flags are never used to perform semantic selections that differ
> from mandated behaviors.

This would be an excellent rule, but sadly it is not practiced
by glibc.


> The -ffast-math option is exactly the right way.

I'm not so sure, because math.h is out of control.  As long as we
encourage other developers to do random things with gcc switches,
they will do just what has happened here.  The poor user has no idea
what the tools are going to do to his program.

C99 specifies what should go into math.h.
I believe that header should contain what the standard says and no more.
But that is just a forlorn hope.  I gave up years ago and never, ever
use math.h any more on any system.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]