add ntheory functions, fix broadcast warnings, polydiv, polyrem