ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 26 Nov 2016 17:35:11 -0600Constant coefficient of Laurent Polynomialshttp://ask.sagemath.org/question/35746/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 = x*y + 1.00000000000000*a6*x + 1.00000000000000*a4*y + x*y^-1 + x^-1*y + 1.00000000000000*a3*y^-1 + 1.00000000000000*a1*x^-1 + x^-1*y^-1
Then I ask
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/x*x*y + 1.00000000000000*a6/x*x + 1.00000000000000*a4/x*y + 1.00000000000000/x*x*y^-1 + 1.00000000000000/x*x^-1*y + 1.00000000000000*a3/x*y^-1 + 1.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.
Thanks in advanceEd CalSat, 26 Nov 2016 17:35:11 -0600http://ask.sagemath.org/question/35746/