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 pinskia at physics dot uc dot edu  2005-03-07 01:39 -------
Subject: Re:  FAIL: 26_numerics/complex/pow.cc execution test


On Mar 6, 2005, at 8:31 PM, dave at hiauly1 dot hia dot nrc dot ca 
wrote:

>
> ------- Additional Comments From dave at hiauly1 dot hia dot nrc dot 
> ca  2005-03-07 01:31 -------
> 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.
>
> Sorry, log(x) == -HUGE_VALUE for x == 0+, not -INFINITY.  This is
> also the documented behavior for hpux11.  The HP log function doesn't
> set ERANGE when x is 0.
>
> SUSV2 also specifies -HUGE_VALE and that ERANGE "may be" set.

Hmm, the hp online docs say the following:
If x is zero, log() returns -HUGE_VAL (equal to -INFINITY) and raises 
the divide-by-zero exception.

but that does not makes sense as HUGE_VAL does not equal INFINITY at all

Darwin's man page says the following:
      log(+-0) , log2(+-0) , and log10(+-0) return -infinity and raise 
the
      "divide-by-zero" floating-point exception.

Linux's man page:
        ERANGE The argument x is zero.  The log of zero is not defined 
(minus infinity).


And C99 standard just says the following:
A range error may occur if the argument is zero.

-- Pinski



-- 


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]