Comment #14 on issue 2260 by [email protected]: What should 0**0 return?
http://code.google.com/p/sympy/issues/detail?id=2260
@Alexey: I think you're misunderstanding what .is_complex means.
x.is_complex means that x is an element of the complex field. And since the
ring of integers is included in the complex field (ZZ in CC),
S.Zero.is_complex is necessarily True. Defining this any other way would
cause way too much problems.
But I see what you mean. You want a way to specify the field in which
operations take place (currently, it's always CC), and have everything be
consistent with that choice. I would write it like that:
>>> sympy.DEFAULT_DOMAIN = Complexes
>>> Symbol('x').is_complex
True
>>> Symbol('x').is_real
>>> S(1)/0
zoo
>>> sympy.DEFAULT_DOMAIN = Reals
>>> Symbol('x').is_complex
True
>>> Symbol('x').is_real
True
>>> S(1)/0
oo
However, I think it's not a good idea to have the value of 1/0 depend on an
arbitrarily mutable global setting.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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-issues?hl=en.