[GiNaC-devel] Bug in ::match.

Chris Dams Chris.Dams at mi.infn.it
Thu Apr 20 18:17:58 CEST 2006


Dear all,

I found out that sometimes match fails even when the pattern matches. This
depends on the canonical ordering. Imagine that we have an expression that
looks like

	x^5*y^(-1).

and a pattern that looks like

	($0)^(-1)*x^($2).

Then the first thing that is attempted is to match x^5 with ($0)^(-1). 
This match will fail, however, the side effect of this match will be that 
the repl_lst now contains $0==x. This repl_lst will prevent the match of 
y^(-1) to ($0)^(-1) to succeed.

A patch is in CVS. I also patched 1.3.

Best,
Chris




More information about the GiNaC-devel mailing list