Perform polynomial long division (#305)