exp(-inf)

Tim Prince tprince@computer.org
Sat Sep 2 17:18:00 GMT 2000


This is under the control of the glibc maintainers, not directly influenced
by gcc people.  If you wish to see my personal idea of a better compromise,
look in ftp://members.aol.com/llibm.tgz
A further caveat; this depends on the -ffast-math option to avoid
significant performance degradation, but many gcc people feel that problems
such as this go with the territory when using that option.

----- Original Message -----
From: "Scott Davies" <scottd@cs.cmu.edu>
To: <gcc-bugs@gcc.gnu.org>
Cc: <scottd@cs.cmu.edu>
Sent: Thursday, August 31, 2000 8:54 AM
Subject: exp(-inf)


>
> Hi --
>
> I recently got bitten by the following behavior: when compiled
> unoptimized, exp(-inf) = 0 (which is what I would hope for), but
> with optimization turned on (-O), the inlined version of exp
> returns exp(-inf) = nan.  (This is on a Pentium-class machine
> with egcs-2.91.66.)
>
> Would this be considered a bug or a feature?  (I suppose someone may
> have decided that this case isn't worth dealing with since doing so
> would slow down the "common case"...)
>
> Thanks,
>
> -- Scott



More information about the Gcc-bugs mailing list