Bug#182574: libc6: The pow() function gives incorrect results on special cases (nan, inf...)
At Tue, 11 Mar 2003 03:10:18 +0100,
Vincent Lefevre wrote:
>
> On Tue, Mar 11, 2003 at 10:03:20 +0900, GOTO Masanori wrote:
> > I'm still investigating this problem, but and I've reached the
> > conclusion that it seems ISO C99 special rules, so it's not bug.
>
> I agree (I didn't know that when I wrote the bug report), except
> for one or two cases I mentioned that didn't follow these rules.
>
> > For example,
> >
> > http://grouper.ieee.org/groups/754/meeting-materials/2001-07-18-c99.pdf
> >
> > page 13 contains:
> >
> > (a) pow(-1, +-inf) = 1
> > pow(+1, x) = 1 for any x, even a NaN
> > pow(x, +-0) = 1 for any x, even a NaN
>
> The C99 latest public draft has different rules. Perhaps they have
> changed in the C99 standard, but one has to make sure that this is
> the case.
Well, even the standard committee, it seems it's difficult to decide
these special cases.
> > I think it's already exceeded to discuss on this Debian BTS. If you
> > think it's bad behavior, please contact to IEEE 754 standard
> > committee.
>
> Well, the elementary functions are not standardised yet in IEEE 754.
> This standard is being revised (see <http://www.validlab.com/754R/>)
> but there won't be anything concerning the elementary functions. So,
> this is concerning only the ISO/IEC 9899 committe.
>
> > I would like to close this bug unless you show more
> > appropriate reason, is it OK?
>
> If the case pow(-inf, nan) is fixed, it is OK (after having a
> confirmation about case (a) above).
pow(-inf, NaN) returns NaN on glibc-2.3.1. Please check.
Regards,
-- gotom
Reply to: