Dear All,

I seem to be have a problem with the Poly module. Unfortunately, I
can't seem to simplify my expression to get a test case.

Currently, my code is:

diff = value.alpha/value.beta - (c3*c1-c3*c2)/c4 #value.alpha is
extracted from an XML file

print value.alpha, value.beta
Poly(c1*c3 - c2*c3, X, Y, Z) Poly(c4, X, Y, Z)

print diff
Poly((c1*c3 - c2*c3)/c4 + c2*c3/c4 - c1*c3/c4, X, Y, Z) #So this
should by Poly(0, X,Y,Z)

print diff.as_dict()
{(0, 0, 0): (c1*c3 - c2*c3)/c4 + c2*c3/c4 - c1*c3/c4} #That's correct

print diff.as_dict()[(0, 0, 0)]
(c1*c3 - c2*c3)/c4 + c2*c3/c4 - c1*c3/c4#Fine

print diff.as_dict()[(0, 0, 0)].expand() # As expected
0

print diff.as_dict()[(0, 0, 0)].expand() == 0 # Correct
True

print diff.expand() ==0 #Surely True?
False

If I miss out the variable c4 then everything works.

Thanks

Colin







--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to