Remember that the dividing procedure for long division of integers finishes whenever the remainder is smaller than the divisor. dividend equals divisor* quotient + remainder Polynomial division follows a similar procedure. When the residue is smaller than the degree of the divisor, the division is…