Comment #1 on issue 1495 by ryanlists: minus problem http://code.google.com/p/sympy/issues/detail?id=1495
I think Ondrej's version is right and mine is wrong: (-t-n*t)/n can extract a minus sign from the numerator. I step through could_extract_minus_sign using Pdb and here are the key results: ipdb> negative_self -(-t - n*t)/n ipdb> self.is_Add False ipdb> type(self) <class 'sympy.core.mul.Mul'> ipdb> self_has_minus True ipdb> negative_self_has_minus True ipdb> hash(self) 1038135297 ipdb> hash(negative_self) -856116161 This seems like the core issue: ipdb> negative_self -(-t - n*t)/n ipdb> negative_self.extract_multiplicatively(-1) -(t + n*t)/n what needs to be done to make negative_self pull the minus sign inside the parenthesis? If negative self where (t+n*t)/n, I think this bug would go away. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
