![]() Volume 9, Issue 3 Articles Tricks of the Trade In and Out Trott's Corner New Products New Publications Calendar News Bulletins New Resources Letters Classifieds Download This Issue Editorial Policy Staff and Contributors Submissions Subscriptions Advertising Back Issues Contact Information |
In and Out
Products of PolynomialsQ: I am computing large numbers of products of high-degree polynomials mod prime A: Daniel Lichtblau (danl@wolfram.com) answers: There is fast dedicated technology built into the Algebra` context for manipulating dense univariate polynomials, represented by coefficient lists, modulo
The one you want is PolynomialTimesModList. Start with code to generate random polynomials modulo some given
Construct a pair of degree 1200 random polynomials.
Multiply them using PolynomialMod.
Converting to coefficient lists, multiplying, and converting back is much faster.
Check the results for consistency.
Generally speaking, you would want to do as much of the computation as possible using the list representation, and only convert from and to explicit polynomials, if at all, at the beginning and end of the process.
|
||||||||
About Mathematica | Download Mathematica Player © 2005 Wolfram Media, Inc. All rights reserved. |