#!/usr/bin/env python from poly import longpoly P = longpoly([2, 2]) print P ** 100
def longpoly(self): bigcoefs = zip(* list(P.coef for P in self.digits)) longcoefs = numpy.array(map( lambda digits: longeval(digits, self.TYPE), bigcoefs)) return longpoly(longcoefs)