[GiNaC-devel] Substitution of wildcards

Jan Rheinländer jrheinlaender at gmx.de
Wed Jun 7 18:26:47 CEST 2017


Hi,

I'm wondering what is going on here (ginsh output):

> subs($1 * x  + 1/2 * x^2 * $2, match(a * x + b, $1 + x * $2));
b*a+1/2*a^3

What happened to "x" ? The match by itself correctly finds

> match(a * x + b, $1 + x * $2);
{$2==a,$1==b}

but the substitution result is weird.

Greetings,

    Jan




More information about the GiNaC-devel mailing list