Updates:
Status: Fixed
Labels: -NeedsReview -asmeurer PassedReview
Comment #13 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
This was reviewed at http://github.com/sympy/sympy/pull/3 and has ben
pushed in. Ronan, or others, if you have problems with the changes, feel
free to reopen this issue.
To recap, expand(complex=True) and as_real_imag() were rewritten so that
the algorithms that pull apart the real and imaginary parts are now in
as_real_imag() instead of the former. This has the advantage of keeping
the two separate, so that functions like re(), im(), and
expand(complex=True) don't have to guess what they are by the coefficient
of I, or some other fallible method.
Externally, the change is not noticeable, except that some things, such as
the original issue, now work correctly:
In [1]: ((x+x*I)/(1+I)).as_real_imag()
Out[1]:
⎛ ⎛x + ⅈ⋅x⎞ ⎛x + ⅈ⋅x⎞⎞
⎜re⎜───────⎟, im⎜───────⎟⎟
⎝ ⎝ 1 + ⅈ ⎠ ⎝ 1 + ⅈ ⎠⎠
--
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.