I'm away from my own computer right now, Vinzent, but from what you've shown above this looks like an issue in distributing the minus sign (what I refer to as the 2-arg mul: a constant distributes over a single Add). There is another matrix test, I believe, that had that problem and it was handled with double parenthesis, something like
-((numer)/den) rather than -(numer)/den By putting (numer)/den in parenthesis, it is no longer an Add that the -1 is multiplying so you don't get the automatic distribution. Here's a demo from live.sympy: >>> sol2=-(4*log(7) + >>> 5*LambertW(-7*2**Rational(4,5)*6**Rational(1,5)*log(7)/10))/(3*log(7)) >>> sol2 (-5*LambertW(-7*2**(4/5)*6**(1/5)*log(7)/10) - 4*log(7))/(3*log(7)) >>> sol3=-((4*log(7) + >>> 5*LambertW(-7*2**Rational(4,5)*6**Rational(1,5)*log(7)/10))/(3*log(7))) >>> sol3 -(4*log(7) + 5*LambertW(-7*2**(4/5)*6**(1/5)*log(7)/10))/(3*log(7)) >>> sol3==ans True If this makes other versions of python unhappy you can use the "ans in [sol32, sol64]" idiom. -- 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.
