[GiNaC-list] conjugates of power objects

Richard B. Kreckel kreckel at ginac.de
Thu May 6 09:02:57 CEST 2010


Hi!

Okay, these are two distinct patches, IIANM. One about restricting 
automatic conjugation, one about adding rules to power::eval(). Let's 
treat them as separate, please!

Burcin Erocal wrote:
> Attached patch adds a rule to power::eval() to transform ^(-c1, c2) to
> *(^(-1, c2), (c1, c2)) when c1 and c2 are both rational. I got this
> idea from maxima. I also restrict the automatic conjugation unless the
> basis is real and the exponent is a rational, returning *this in this
> case.
> 
> This seems to give an acceptable response to conjugate(sqrt(-3)):
> 
> sage: conjugate(sqrt(-3))
> -I*sqrt(3)
> 
> 
> Comments?

Burcin, I suppose you were unaware of
<http://www.ginac.de/ginac.git?p=ginac.git;a=blob_plain;f=doc/powerlaws.tex;hb=master>
but can provide a rigorous proof of this rule, right?

Best wishes
     -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the GiNaC-list mailing list