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]

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

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