Seen this?

```
If dim(L₁)<dim(L₂)
Return
dim(L₁)→M
dim(L₂)→N
L₁→L₄
{0}→L₃
M–N+1→dim(L₃)
For(K,M–N,0,-1)
L₄(N+K)/L₂(N)→L₃(K+1)
For(J,N+K–1,K+1,-1)
L₄(J)–L₃(K+1)L₂(J–K)→L₄(J)
End
End
N–1→dim(L₄)
```

where L₁ is the numerator polynomial, L₂ is the denominator polynomial, L₃ is the quotient, and L₄ is the remainder. Only thing is that the convention I had used is "constant term first" unlike the "highest power first" convention in the program you had posted. You might be able to adapt the above to your convention.

thornahawk