toom-cook implementation for polynomials with degree k^m