newlib?: pow function can produce incorrect results.

Lev Bishop
Wed May 2 14:58:00 GMT 2007

On 5/1/07, Cary R. wrote:
> Patch generated and applied to newlib CVS. As an added  bonus I fixed a
> few other inconsistencies in acos(), asin(), log() and log10().

Just for the benefit of anyone else investigating this kind of thing
in the future, because I got confused by it and had to do some
searching, the "pow(x,0)=1, even for x=NaN" and "pow(-1,+-inf)=1"
rules are cases where the (freely available) earlier public drafts of
C99 differ from the final version of the standard (which you have to
purchase). This has confused other projects also, see eg:

Other potentially controversial special cases (may or may not be
handled correctly by newlib -- I didn't check) are:
hypot(+-inf,y)=+inf, even for y=NaN

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list