[GiNaC-devel] Improvements for algebraic substitutions.
Chris Dams
Chris.Dams at mi.infn.it
Tue Jan 3 13:00:06 CET 2006
Happy new year!
I found out that if we do (notation simplified to be more readable but
less compilable):
(a^n*b^m*b^p).subs($0^$1*$0^$2==$0^($1+$2),subs_options::algebraic)
nothing happens because a^n already matches a factor in the pattern and
in that case no other matches are attempted. I fixed this.
Also, I allowed algebraic substitution to match multiple times on
different factors with the same pattern. E.g. the above .subs() can be
used to simplify
a^n*a^m*b^p*b^q -> a^(n+m)*b^(p+q)
These changes are in CVS.
Bye,
Chris
More information about the GiNaC-devel
mailing list