Comment #5 on issue 3730 by [email protected]: cancel should work with
primitive of expression
http://code.google.com/p/sympy/issues/detail?id=3730
I'm not sure if it can be predicted. The cancelation is based on the ad hoc
way that Poly creates generators out of the subexpressions, and how they
combine when substituted back in to the result. For example, Poly(z) has
generators q, a, b, sqrt(b), and 1/sqrt(b), where a is a cube root of a
quadratic in q (the Symbol), and b is 1/(-2*a - 13/12).
Poly(z.as_numer_denom()[0]).gens are even more complicated.
The issue is that the generators are not algebraically independent. This
can lead to issues for any kind of algebraic relationship, but for the
really simple ones (like sqrt(b) and 1/sqrt(b)), it is extremely likely,
because to Poly, 1 - sqrt(b)*1/sqrt(b) is not 0, so whenever those two
generators multiply each other somewhere, Poly sees it as a degree 2 object
when it is really a degree 0 object. The same issue comes up if a**3 is
represented, and so on.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.