Skip to content
Prev 30325 / 63421 Next

0 ^ NaN == Inf, why?

And John Chambers writes:
There are slides from Jim Thomas summarizing the C99 choices for
elementary functions at
  http://grouper.ieee.org/groups/754/meeting-materials/2001-07-18-c99.pdf
or in an html version in the meeting notes at
  http://grouper.ieee.org/groups/754/meeting-minutes/01-07-18.html

IIRC, pow(x, +/- 0) is taken to be 1 for all x because pow(x, 0) = 1 and
pow(x, -0) = 1/pow(x, 0) = 1/1 = 1 for all finite, numerical, non-zero
x.  The NCEG folks spent a huge effort considering mathematical reasons
and actual applications when they chose the special case values.
Disagreements over special cases are natural, alas, but they did the
best anyone really could.

Jason