[GiNaC-list] comparing symbols
Jens Vollinga
jensv at nikhef.nl
Fri Jul 25 16:23:13 CEST 2008
Hi,
Chris Bouchard schrieb:
> 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
that is the problem: you use symbols with names "0" and "1" !
> 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
> optimal.
I don't know what you mean, but the "0","1",etc. are just names for the
output and are _completely_ irrelevant for any algebraic operation.
If you want to match patterns then you have to use the C++ variable name
of the symbols you give to r_sum.
Regards,
Jens
More information about the GiNaC-list
mailing list