complex conjugation

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Thu Dec 18 23:26:46 CET 2003


On Thu, 18 Dec 2003, Jens Vollinga wrote:
[...]
> Only harmonic and multiple polylogs take some knowledge to conjugate,
> the other polylogs could use the default behaviour. Harmonic polylogs
> can be evaluated everywhere now, so they would need the knowledge of how
> to cconj themselves.

Now I'm confused.  Aren't those harmonic and multiple polylogs analytic?

> Maybe all of this can be taken into account by the following
> approach:
> - Every class has a (private) method for cconj and there are macros for
>   the Ginac-function. This is basically your patch.
> - There exists a Ginac-function cconj (or different name?). It evaluates
>   by calling the (private) cconj methods. If (by a not yet specified
>   way) the method signals, that it could cconj correctly, the
>   Ginac-cconj is replaced by the result, otherwise Ginac-cconj remains
>   unevaluated.
>
> That should give for
>   symbol x("x");
>   ex a = sin(x) + 3 + 4*I - sin(2/3*I);
>   cout << cconj(a) << endl;
> something like
>   sin(cconj(x)) + 3 - 4*I - sin(-2/3*I)

Looks good.  Those private cconj methods could be elegnatly hooked at
compile time, alike to what Cebix did with the print functions, I assume?

Regards
    -richy.
-- 
Richard B. Kreckel
<Richard.Kreckel at GiNaC.DE>
<http://www.ginac.de/~kreckel/>




More information about the GiNaC-devel mailing list