This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
exp(-inf)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: exp(-inf)
- From: Scott Davies <scottd at cs dot cmu dot edu>
- Date: Thu, 31 Aug 2000 11:54:33 -0400
- CC: scottd at cs dot cmu dot edu
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