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]
Other format: [Raw text]

[Bug libstdc++/20352] FAIL: 26_numerics/complex/pow.cc execution test


------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  2005-03-07 01:41 -------
Subject: Re:  FAIL: 26_numerics/complex/pow.cc execution test

> > We have log(x) == -inf for x == 0+.  The exp call is returning 0+
> > but the argument isn't -inf.  It's -5.9923104495410517e+307.  -inf
> > is -1.7976931348623157e+308.
> 
> Interesting. Therefore, 1/3*(-inf) instead of giving the very same -inf, as
> should happen in IEEE, gives 1/3*(-1.79769..e+308)! Still, this cannot
> explain the NaN, because, then, the involved exp can only be slighlty bigger
> than zero... The only other tricky bit of the computation seems atan2(0.0, 0.0)
> which should be also zero, of course. Then those two zeros (the latter mult
> be 1/3) are passed to complex::polar which only computes sin and cos,
> always defined.

I'll dig some more.  Just for the record, this is the latest standard
for log <http://www.opengroup.org/onlinepubs/009695399/functions/log.html>.
Linux seems non conformant in returning -Inf.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20352


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