Quoting wikipedia's article on NaN:

The 2008 version of the IEEE 754
<http://en.wikipedia.org/wiki/IEEE_754> standard
says that pow(1,qNaN) and pow(qNaN,0) should both return 1 since they
return 1 whatever else is used instead of quiet NaN.

To satisfy those wishing a more strict interpretation of how the power
function should act, the 2008 standard defines two additional power
functions; pown(x, n) where the exponent must be an integer, and
powr(x, y) which
returns a NaN whenever a parameter is a NaN or the exponentiation would
give an indeterminate form <http://en.wikipedia.org/wiki/Indeterminate_form>
.


qNaN is a "quiet NaN"; the other type of NaN is a "signaling NaN":
"Signaling NaNs, or sNaNs, are special forms of a NaN that when consumed by
most operations should raise an invalid exception and then, if appropriate,
be "quieted" into a qNaN that may then propagate." SymPy only has one type
of NaN.


We have a half-implemented version currently: S(1)**S.NaN == S.NaN but
S(0)**S.NaN == S.One. So which way should we go?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to