Divide polynomials easily!
From PyPI:
$ pip install polynomial-division
$ divide 2,-1,7,4 2,1
-
dividend
: a list of coefficients. For example, for the polynomial$2x^3 - x^2 + 7x + 4$ , this is2,-1,7,4
-
divisor
: a list of coefficients. For example, for the expression$2x+1$ , this is2,1
Result: 1.0x^2 + -1.0x^1 + 4.0
from polynomial_division import polynomial_divide as pd
print(pd((2,-1,7,4), (2,1)))
-
dividend
: a tuple of coefficients. For example, for the polynomial$2x^3 - x^2 + 7x + 4$ , this is(2,-1,7,4)
-
divisor
: a tuple of coefficients. For example, for the expression$2x+1$ , this is(2,1)
(1.0, -1.0, 4.0)