1. Can you come up with a Sage parent (other than SR) where
element.is_zero() is sometimes undecidable?
2. Same question where it is decidable but the current implementation
is incomplete?
Regards,
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
Hi,
If a symbolic expression contains symbolic derivative then
checking whether it is zero, raises error:
--
sage: x.diff(x,2).is_zero()
True
sage: f(x).diff(x).is_zero()
NotImplementedError: derivative
--
This fails because new symbolics tries to convert it to maxima
expression f
Hi,
I have some problems with the way is_zero() is implemented (or maybe
it is the documentation...)
Is this behavior really desirable?
sage: k = var('k')
sage: pol = 1/(k-1) - 1/k -1/k/(k-1)
sage: pol
-1/((k - 1)*k) - (1/k) + 1/(k - 1)
sage: pol.partial_fraction()
0
sage: pol.is_zero()
False
sag
Hi there,
many classes in SAGE implement and test for is_zero. I think these methods
should be replaced with __nonzero__ methods, as this is the standard way of
doing such a test in Python. For example, int doesn't have a is_zero(), such
that one would have to test for a type (of a return val