10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

518 Chapter 9 FAST ALGORITHMS FOR LARGE-INTEGER ARITHMETIC<br />

There are no more recursive levels (for our example choice b = 2) because<br />

the eval function will break over to some classical method such as an easy<br />

instance of Horner’s rule and evaluate these last a(t),b(t) values directly, each<br />

one at four t = ti values. The final returned entity from eval turns out to be<br />

the sequence<br />

(x(t0),...,x(t7)) = (40320, 518918400, 29654190720, 424097856000,<br />

3100796899200, 15214711438080, 57274321104000, 178462987637760).<br />

Indeed, the product of these eight values is exactly 64!, as expected. One<br />

should note that in such a “product” operation—where evaluations are<br />

eventually all multiplied together—the last phase of the eval function need<br />

not return a union of two signals, but may instead return the product<br />

eval(a, u) ∗ eval(b, v). If that is the designer’s choice, then the step [Check<br />

breakover threshold ...] must also return the product of the indicated x(ti).<br />

Incidentally, polynomial coefficients do not necessarily grow large as the<br />

above example seems to suggest. For one thing, when working on such as a<br />

factoring problem, one will typically be reducing all coefficients modulo some<br />

N, at every level. And there is a clean way to handle the problem of evaluating<br />

x(t) ofdegreeDat some smaller number of points, say at t0,...,tn−1 with<br />

n

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!