Comment #1 on issue 3162 by [email protected]: Wrong result from as_real_imag
http://code.google.com/p/sympy/issues/detail?id=3162

Actually, if you assume z is real, you get the right answer:


In [70]: z = Symbol('z', real=True)

In [71]: w1 = sqrt((z + 2)/(z - 2))

In [72]: w1.as_real_imag()
Out[72]:
⎛   ⎛     ⎛   z + 2⎞⎞                 ⎛     ⎛   z + 2⎞⎞            ⎞
⎜   ⎜atan2⎜0, ─────⎟⎟                 ⎜atan2⎜0, ─────⎟⎟            ⎟
⎜   ⎜     ⎝   z - 2⎠⎟   _________     ⎜     ⎝   z - 2⎠⎟   _________⎟
⎜cos⎜───────────────⎟⋅╲╱ │z + 2│   sin⎜───────────────⎟⋅╲╱ │z + 2│ ⎟
⎜   ⎝       2       ⎠                 ⎝       2       ⎠            ⎟
⎜────────────────────────────────, ────────────────────────────────⎟
⎜            _________                         _________           ⎟
⎝          ╲╱ │z - 2│                        ╲╱ │z - 2│            ⎠

This is perhaps related to issue 754.

--
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.

Reply via email to