Comment #3 on issue 1985 by asmeurer: as_real_imag() gives wrong answer when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985

Actually, whenever the new assumptions work (or is that now already?), we could/should just use that. In other words, have re(), im(), and as_real_imag() call Ask(term, Q.imaginary) and Ask(term, Q.real) (on each Add term after expand(complex=True), just like now), and if those return True or False, return it in the relevant place, or else if they return None, just return an unevaluated re(term) or im(term). Also, if it somehow knows that it is purely imaginary but can't pull out I using as_coefficient(), just return term/I or -I*term.

That, I think, would be the ideal solution to the problem. I just don't know if Ask is ready to do this yet or not, because I haven't played with it in a while.

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

Reply via email to