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

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

-- 
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: