[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...)



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.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Reply to: