expand()

Stefan Weinzierl stefanw at fis.unipr.it
Mon Jun 25 16:47:28 CEST 2001


Hi Christian,

thanks for your prompt answer from last Friday.
Unfortunately I have another little problem:
The following lines

    symbol eps("eps");

    idx a(symbol("a"),8) ,b(symbol("b"),8), c(symbol("c"),8),d(symbol("d"),8);

    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;

prints out

  eps^4*(T.b*T.d)+(T.a*T.d)*eps^3-eps^3*(T.b*T.c)-eps^2*(T.a*T.c)

e.g. the terms which would have a "1" from either one of the two factors
do not show up.

 Stefan






More information about the GiNaC-devel mailing list