# Revision history [back]

### Constant coefficient of Laurent Polynomials

I am looking for the constant coefficient of a Laurent polynomial, the issue I am having is that sage is not simplifying the polynomial.

An example:

a = var(",".join( "a%i" %i for i in range(0, 6))) f = xy + 1.00000000000000a6x + 1.00000000000000a4y + xy^-1 + x^-1y + 1.00000000000000a3y^-1 + 1.00000000000000a1x^-1 + x^-1y^-1

f/(x^1*y^0) (The powers have to be in this way, just from the context of the work I am doing)

and it outputs:

1.00000000000000/xxy + 1.00000000000000a6/xx + 1.00000000000000a4/xy + 1.00000000000000/xxy^-1 + 1.00000000000000/xx^-1y + 1.00000000000000a3/xy^-1 + 1.00000000000000a1/xx^-1 + 1.00000000000000/xx^-1y^-1

Now when I ask for the constant coefficient of this LP it tells me its 0 when it is a6.

How can I fix this.

 2 None tmonteil 22973 ●25 ●163 ●420 http://wiki.sagemath.o...

### Constant coefficient of Laurent Polynomials

I am looking for the constant coefficient of a Laurent polynomial, the issue I am having is that sage is not simplifying the polynomial.

An example:

a = var(",".join( "a%i" %i for i in range(0, 6)))
f = xy x*y + 1.00000000000000a6x 1.00000000000000*a6*x + 1.00000000000000a4y 1.00000000000000*a4*y + xy^-1 x*y^-1 + x^-1y x^-1*y + 1.00000000000000a3y^-1 1.00000000000000*a3*y^-1 + 1.00000000000000a1x^-1 1.00000000000000*a1*x^-1 + x^-1y^-1x^-1*y^-1


f/(x^1*y^0)   #  (The powers have to be in this way, just from the context of the work I am doing)doing)


and it outputs:

1.00000000000000/xxy

1.00000000000000/x*x*y + 1.00000000000000a6/xx 1.00000000000000*a6/x*x + 1.00000000000000a4/xy 1.00000000000000*a4/x*y + 1.00000000000000/xxy^-1 +
1.00000000000000/xx^-1y 1.00000000000000/x*x*y^-1 + 1.00000000000000a3/xy^-1 1.00000000000000/x*x^-1*y + 1.00000000000000a1/xx^-1 1.00000000000000*a3/x*y^-1 + 1.00000000000000/xx^-1y^-11.00000000000000*a1/x*x^-1 + 1.00000000000000/x*x^-1*y^-1


Now when I ask for the constant coefficient of this LP it tells me its 0 when it is a6.

How can I fix this.