[GiNaC-list] coeff() method

Alexei Sheplyakov alexei.sheplyakov at gmail.com
Sun Sep 19 18:37:56 CEST 2010


Hello,


On Sun, Sep 19, 2010 at 5:14 PM, Burcin Erocal <burcin at erocal.org> wrote:

>> f = x*y*z^2;
> y*z^2*x
>> coeff(f, z^2,1);
> y*x
>> coeff(f, x*y,1);
> 0

Works as designed.

> I'd greatly appreciate any help fixing this.

I think it's the user code which should be fixed.
I.e. write

f.coeff(x, 1).coeff(y, 1)

instead of ill-defined

f.coeff(x*y, 1)

Best regards,
        Alexei


More information about the GiNaC-list mailing list