In article <firstname.lastname@example.org>, email@example.com wrote:
> .... > (1 + x^-2)(x^3 + 1) = x^3 + x + 1 + x^-2 > > Now if I were to use the standard polynomial division algorithm (I appreciate > that x^-2 + 1 is not a polynomial) to work out > > (x^3 + x + 1 + x^-2) / (x^3 + 1) > > then I would obtain a whole part of 1 and a remainder of x + x^-2. And this > is clearly not right....
Allowing negative powers actually gives you the quotient 1 + x^-2 and remainder 0.
But a simple way to deal with it is to use genuine polynomials. Your x^3 + x + 1 + x^-2 = x^-2.(x^5 + x^3 + x^2 + 1). Ordinary division of x^5 + x^3 + x^2 + 1 by x^3 + 1 gives x^5 + x^3 + x^2 + 1 = (x^3 + 1)(x^2 + 1) + 0 and then you can just reintroduce the factor x^-2.