Original Post
I'm looking for a decent C++ polynomial library (although I suppose python would be ok.) What I need: -- Can handle large sparse polynomials ---- 10,000+ coefficients with long gaps between them -- Fast multiplication (faster than naive O(n^2)). Ie, at least one of: ---- Karatsuba multiplication (or the variants on it) ---- Fourier transform multiplication ---- Other (number-theoretic?) transform-based multiplication -- Substitution of variables (x for x^500) -- Derivative/evaluate/etc Ideally, but I can deal with it if it can't: -- C++ esque (with overloaded operators, etc) -- Understands multi-variable polynomials -- Serialization/deserialization -- "Fast return" classes or "Copy on write" or the like I'm about half way there with self-written library, and ran into a problem with the speed of multiplication (a test case took more than an hour to multiply). At this point, I can either continue improving my own implementation, or find one that already has fast multiplication. =) Does anyone have any recommended libraries? (And no, I don't expect to be able to multiply two 100,000 element polynomials in real time. But less than 10 minutes would be nice... ;) )