Updates:
Labels: -CodeInDifficulty-Easy CodeInDifficulty-Hard
Comment #20 on issue 2052 by [email protected]: is_zero should default to
None, not False
http://code.google.com/p/sympy/issues/detail?id=2052
In assumptions.py, something like the marked line should be added:
if e.is_Number:
if self.is_Number or e._prec != 1: # <========
a = _real_cmp0_table[k][cmp(e, 0)]
if a is not None:
self._learn_new_facts( ((k,a),) )
return a
Although this doesn't fix the issue with anwering whether `e` in comment 19
is zero, evalf() should not be used to make a decision if the precision is
1 (which means there was no precision obtained in the answer; most likely
the expression was zero).
Note also that e.is_integer returns False in the old and new assumption
system:
>>> e.is_integer
False
>>> ask(Q.integer(e))
False
In both cases, it should return None (at worst) or True (at best). It
falters in the old system because it is assumed that if all the terms are
not integers then an Add cannot be an integer.
In case the labels are consulted in the future, I changed this to a 'hard'
rating. I don't think that getting this all to work will be trivial.
--
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.