expand()

Christian Bauer cbauer at student.physik.uni-mainz.de
Mon Jun 25 17:35:30 CEST 2001


Hi!

On Mon, Jun 25, 2001 at 04:47:28PM +0200, Stefan Weinzierl wrote:
>     ex g = (1+eps*color_T(a)+pow(eps,2)*color_T(b))*(1-eps*color_T(c)+pow(eps,2)*color_T(d));
>     cout << expand(g) << endl;

You have to use color_ONE() instead of just "1" where appropriate (terms of
a sum must all be of the same type):

    ex g = (color_ONE()+eps*color_T(a)+pow(eps,2)*color_T(b))
         * (color_ONE()-eps*color_T(c)+pow(eps,2)*color_T(d));

This will produce the right expression on expand().

Bye,
Christian

-- 
  / Coding on PowerPC and proud of it
\/ http://www.uni-mainz.de/~bauec002/



More information about the GiNaC-devel mailing list