Comment #8 on issue 1724 by asmeurer: conjugate doesn't work for rational  
powers
http://code.google.com/p/sympy/issues/detail?id=1724

Ah, so I misunderstood.  So it seems that it is already implemented under  
the guise of expand(complex=True).

Yes then, I think this is exactly what we should do.  As for speed, I would  
be willing to have it slower if it is going to actually
return the correct result ;)

I wonder if we should still try to have it raise NotImplemented if it  
cannot do it because there is no telling what things
expand_complex might not work for.  The best way would be to use the  
assumptions system to make sure that conjugate(x)
== x iff ask(x, Q.real) == True (though I don't know what it should then do  
if ask(x, Q.real) == None).

By the way, as_real_imag should use expand_complex() instead of  
expand(complex=True), so it does not do unnecessary
expansion that the user may not want.  For example,

In [37]: x, y = symbols('x y', real=True)

In [38]: print exp(x + y).as_real_imag()
(exp(x)*exp(y), 0)

If anyone makes a patch for this, could you throw that small fix in there?

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--

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