[GiNaC-list] comparing symbols

Chris Bouchard cbouchrd at illinois.edu
Fri Jul 25 16:13:42 CEST 2008


>try the code
>cout << tree << "x = " << x << "\n";
>then we can see what is going on.

x = lst @0x8a08c70, hash=0xc, flags=0x13, nops=2
    0 (symbol) @0x8a3df40, serial=62607, hash=0x771ff4, flags=0x7, domain=0
    1 (symbol) @0x8a2bde8, serial=62608, hash=0x771ff4, flags=0x7, domain=0

>Maybe r_sum is called with something like
>	symbol f1("0");
>	symbol f2("1");
>	r_sum(...,lst(f1,f2),...);

Wouldn't that eliminate functional dependence on the
variables represented by f1 & f2, making the return value
a function of "0" and "1".  The end user could handle this
by manually simplifying the output, but that wouldn't be

Chris Bouchard

More information about the GiNaC-list mailing list