Hi all, (Before I start--one question: Google Code bug tracker or Github bug tracker--which is the right one?)
I'm writing because I could use some expert help sorting through my findings in this bug: https://code.google.com/p/sympy/issues/detail?id=3262 I think I've diagnosed most of the things that *cause* the breakage, but the fix isn't obvious, because the code seems to assume things that then turn out to be untrue. The symptom is this: >>> x = sp.Symbol("x") >>> xx = -sp.I*x >>> print xx._eval_subs(-x, sp.Symbol("y")) y The causes (as far as I was able to figure out) are: - First, I.as_base_exp() returns (-1, 1/2). I doubt this is wise--see next point. - breakup() within Mul._eval_subs() then adds up exponents of (-1), yielding (-1)**(3/2), which sympy justifiedly rejects as undefined. - That error really never comes to pass, though, because Mul._eval_subs() throws away the coefficient (and all its powers) if it was able to multiplicatively_extract() them. Unfortunately, it assumes that the entire 'coefficient' is contained in the first arg of the Mul, which is untrue in this case. Any help would be much appreciated. Thanks, Andreas -- You received this message because you are subscribed to the Google Groups "sympy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/1mw8EAU0YtIJ. 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.
