problem with normal()

Alexander Frink Alexander.Frink at Uni-Mainz.DE
Thu Sep 9 17:34:58 CEST 1999


Hi!

It is time to open the discussion in this mailing list,
since all developers seem to be subscribed.

I found a problem with normal() which did not exist in older
versions of GiNaC, but I have not found out yet when exactly
it broke:

    symbol z("z");
    symbol a("a");

    ex e=-(z+1)/(2*a-1)+2*(z+1)*a/(2*a-1);
    cout << "e=" << e << endl;
    //e.printtree(cout);
    cout << "e.normal()=" << e.normal() << endl;
    //e.normal().printtree(cout);
    cout << "e.normal().normal()=" << e.normal().normal() << endl;
    //e.normal().normal().printtree(cout);

gives

e=(2*a-1)^(-1)*(-z-1)+(2*a-1)^(-1)*(2*z+2)*a
e.normal()=(2*a-1)^(-1)*(2*a*z-z+2*a-1)
e.normal().normal()=z+1

The printtree() output looks reasonable.
 
-- 
Alexander Frink                      E-Mail: Alexander.Frink at Uni-Mainz.DE
Institut fuer Physik                 Phone:  +49-6131-393391
Johannes-Gutenberg-Universitaet
D-55099 Mainz, Germany




More information about the GiNaC-devel mailing list