Polynomial synthetic division: Difference between revisions

Content added Content deleted
(+draft task. Also, how is this different from long division?)
(→‎{{header|Python}}: Added details about the ordering of coefficients)
Line 3: Line 3:


=={{header|Python}}==
=={{header|Python}}==
Here is an extended synthetic division algorithm, which means that it supports a divisor polynomial (instead of a monomial or a binomial). It also supports non-monic polynomials (polynomials which first coefficient is different than 1).
Here is an extended synthetic division algorithm, which means that it supports a divisor polynomial (instead of a monomial or a binomial). It also supports non-monic polynomials (polynomials which first coefficient is different than 1). Polynomials are represented by lists of coefficients with increasing degree (left-most is the constant, right-most is the major degree).
{{works with|Python 2.x}}
{{works with|Python 2.x}}
<lang python># -*- coding: utf-8 -*-
<lang python># -*- coding: utf-8 -*-