Comment #21 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
Issue 2067 has been merged into this issue.
--
You received this message because you are subscribed to the Google Groups
sympy-issues group.
Comment #14 on issue 1985 by Vinzent.Steinberg: as_real_imag() gives wrong
answer when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
Well, I wish the content of comment 13 was part of some commit message. :)
--
You received this message because you are subscribed
Updates:
Cc: asmeurer ondrej.certik
Comment #15 on issue 1985 by smichr: as_real_imag() gives wrong answer when
expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
One thing you have to watch out about these core routines is that what the
name says and what the
Comment #16 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
Re 14: Well, it actually is, only maybe in a more contorted way. I wrote
the commit message a while ago. The test itself isn't named in
Comment #17 on issue 1985 by smichr: as_real_imag() gives wrong answer when
expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
When the original post says that the correct answer should be re(x), im(x)
why is the expression of Out[1] considered to be correct in comment
Comment #18 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
It's based on comment 4. I guess as_real_imag could do simplification,
though I rather think it shouldn't.
The important part is that the
Comment #20 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
Well, that isn't true anymore. The way it is after my patch,
as_real_imag() performs complex expansion to obtain the real and imaginary
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
Updates:
Labels: asmeurer renato.coutinho
Comment #12 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
(No comment was entered for this change.)
--
You received this message because you are
Comment #11 on issue 1985 by smichr: as_real_imag() gives wrong answer when
expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
Before you consider patching anything consider the radical surgery
accomplished by commit 1725 which adds the hint manager. Most of the
Updates:
Labels: NeedsReview
Comment #7 on issue 1985 by renato.c...@gmail.com: as_real_imag() gives
wrong answer when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
Ok, my first (naive) tries were very unsuccessful. It turns out ask() works
for simple
Comment #8 on issue 1985 by smichr: as_real_imag() gives wrong answer when
expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
In github/smichr branch t (the one up for review) you will get:
import sympy as S
S.var('x')
x
e = (x+x*S.I)/(1+S.I)
e.as_real_imag()
Comment #9 on issue 1985 by renato.c...@gmail.com: as_real_imag() gives
wrong answer when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
Yes, it works too. It's almost the same thing, using expand(c_mul=True). I
missed that in the docs, and was a bit surprised when
Updates:
Cc: Ronan.Lamy smichr Vinzent.Steinberg
Comment #10 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
So I was so convinced that my solution (refactoring expand(complex=True)
and
Comment #1 on issue 1985 by renato.c...@gmail.com: as_real_imag() gives
wrong answer when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
A simple workaround is to use expand(complex=True, deep=True). Actually,
all as_real_imag() does is expand(complex=True,
Comment #2 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
The recursion is because re() calls as_real_imag on it's argument to get
the real part, whereas .as_real_imag() calls expand(complex=True),
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
Comment #5 on issue 1985 by asmeurer: as_real_imag() gives wrong answer
when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
You usually want the two in pairs, so I think as_real_imag() has its
place. I just do not at all like that code that
assumes
Comment #6 on issue 1985 by renato.c...@gmail.com: as_real_imag() gives
wrong answer when expanding quotient
http://code.google.com/p/sympy/issues/detail?id=1985
Playing with it a bit more, looks like ask(expr, Q.real) works well in this
case, and could be used the way Aaron said. I'll
19 matches
Mail list logo