Arrange the terms of the dividend and divisor in descending powers.
If the leading term of the divisor is missing from the dividend, include zero-coefficient terms as needed.
Divide the leading term of the dividend by the leading term of the divisor to get the first quotient term.
Multiply the entire divisor by that quotient term.
Subtract the result from the dividend.
Bring down the next term (or repeat subtraction if no gap exists).
Repeat: divide the new leading term of the remainder by the leading term of the divisor.
Continue until the remainder degree is less than the divisor degree.
Write the final result as: quotient + remainder/divisor.
If the remainder is 0, write the result as just the quotient.
