[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#182574: libc6: The pow() function gives incorrect results on special cases (nan, inf...)



Hi,

At Tue, 11 Mar 2003 11:21:25 +0100,
Vincent Lefevre wrote:
> On Tue, Mar 11, 2003 at 12:46:20 +0900, GOTO Masanori wrote:
> > > 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.
> 
> Yes, the problems are mainly due to overloading different functions
> (in the mathematical point of view) by a single function.
> 
> OK, there were changes after the latest public draft. I've been told
> in fr.comp.lang.c (<m3el5edz77.fsf@uniton.integrable-solutions.net>):
> 
>          -- pow(-1, ±inf) returns 1.
> 
>          -- pow(+1, y) returns 1 for any y, even a NaN.

Thanks for your investigation.  The first rule is still difficult to
understand, but the second is clearer than the previous one.  If the
draft is approved, then we should change the behavior of them (and I
guess glibc math core library, thus IBM mathmatical library may be
updated).

I would like to close this bug for a while before the new standard is
approved.  In future, if the standard is approved but the modification
of glibc is idle, please reopen or resubmit bug.  Is it OK?

Regards,
-- gotom



Reply to: