nayakrujul / polynomial-division

Divide polynomials easily!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

polynomial-division

Divide polynomials easily!

Installation

From PyPI:

$ pip install polynomial-division

Command line

Command

$ divide 2,-1,7,4 2,1

Parameters

  • dividend: a list of coefficients. For example, for the polynomial $2x^3 - x^2 + 7x + 4$, this is 2,-1,7,4
  • divisor: a list of coefficients. For example, for the expression $2x+1$, this is 2,1

Output

Result: 1.0x^2 + -1.0x^1 + 4.0

Python

Import module

from polynomial_division import polynomial_divide as pd

Call function

print(pd((2,-1,7,4), (2,1)))

Parameters

  • 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)

Output

(1.0, -1.0, 4.0)

About

Divide polynomials easily!

License:Apache License 2.0


Languages

Language:Python 100.0%