Stapsgewijze uitleg
1. Read dividend and divisor
Parse the dividend and divisor polynomials and normalize their terms for long division.
2. Perform polynomial division
Apply divide, multiply, and subtract cycles to compute quotient and remainder.
3. Write final form
Return the quotient and, when needed, add remainder divided by the divisor.