> <\body> <\hide-preamble> \; > |>|||<\author-affiliation> School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia |>>||<\author-affiliation> CNRS, Laboratoire d'informatique École polytechnique 91128 Palaiseau Cedex France |>>||<\author-affiliation> CNRS, Laboratoire d'informatique École polytechnique 91128 Palaiseau Cedex France |>>> We give a new proof of Fürer's bound for the cost of multiplying -bit integers in the bit complexity model. Unlike Fürer, our method does not require constructing special coefficient rings with ``fast'' roots of unity. Moreover, we establish the improved bound > n>|)>> with . We show that an optimised variant of Fürer's algorithm achieves only , suggesting that the new algorithm is faster than Fürer's by afactor of > n>>. Assuming standard conjectures about the distribution of Mersenne primes, we give yet another algorithm that achieves . |||> Let > denote the cost of multiplying two -bit integers in the deterministic multitape Turing model (commonly called ``bit complexity''). Previously, the best known asymptotic bound for > was due to Fürer. He proved that there is a constant 1> such that <\eqnarray*> >||> n>|)>,>>>> where > x>, for \>, denotes the iterated logarithm, i.e., <\eqnarray*> > x>|>|\:logk> x\1|}>,>>|k>>>|>|\|k\>\.>>>> The main contribution of this paper is a new algorithm that yields the following improvement. <\theorem> For \> we have <\eqnarray*> >||> n>|)>.>>>> Fürer suggested several methods to minimise the value of in his algorithm, but did not give an explicit bound for . In section of this paper, we outline an optimised variant of Fürer's algorithm that achieves . We do not know how to obtain 16> using Fürer's approach. This suggests that the new algorithm is faster than Fürer's by a factor of > n>>. The idea of the new algorithm is remarkably simple. Given two -bit integers, we split them into chunks of exponentially smaller size, say around bits, and thus reduce to the problem of multiplying integer polynomials of degree > with coefficients of bit size >. We multiply the polynomials using discrete Fourier transforms (DFTs) over >, with a working precision of > bits. To compute the DFTs, we decompose them into ``short transforms'' of exponentially smaller length, say length around , using the Cooley--Tukey method. We then use Bluestein's chirp transform to convert each short transform into a polynomial multiplication problem over >, and finally convert back to integer multiplication via Kronecker substitution. These much smaller integer multiplications are handled recursively. The algorithm just sketched leads immediately to a bound of the form. A detailed proof is given in section. We emphasise that the new method works directly over >, and does not need special coefficient rings with ``fast'' roots of unity, of the type constructed by Fürer. Optimising parameters and keeping careful track of constants leads to Theorem, which is proved in section. We also prove the following conditional result in section. <\theorem> Assume Conjecture. Then <\eqnarray*> >||> n>|)>.>>>> Conjecture is a slight weakening of the Lenstra--Pomerance--Wagstaff conjecture on the distribution of Mersenne primes, i.e., primes of the form -1>. The idea of the algorithm is to replace the coefficient ring > by the finite field |]>>; we are then able to exploit fast algorithms for multiplication modulo numbers of the form -1>. An important feature of the new algorithms is that the same techniques are applicable in other contexts, such as polynomial multiplication over finite fields. Previously, no Fürer-type complexity bounds were known for the latter problem. The details are presented in the companion paper. In the remainder of this section, we present a brief history of complexity bounds for integer multiplication, and we give an overview of the paper and of our contribution. More historical details can be found in books such as8>. Multiplication algorithms of complexity |)>> in the number of digits were already known in ancient civilisations. The Egyptians used an algorithm based on repeated doublings and additions. The Babylonians invented the positional numbering system, while performing their computations inbase instead of . Precise descriptions of multiplication methods close to the ones that we learn at school appeared in Europe during the late Middle Ages. For historical references, we refer to and. The first subquadratic algorithm for integer multiplication, with complexity |)>>, was discovered by Karatsuba. From a modern viewpoint, Karatsuba's algorithm utilises an evaluation-interpolation scheme. The input integers are cut into smaller chunks, which are taken to be the coefficients of two integer polynomials; the polynomials are evaluated at several well-chosen points; their values at those points are (recursively) multiplied; interpolating the results at those points yields the product polynomial; finally, the integer product is recovered by pasting together the coefficients of the product polynomial. This cutting-and-pasting procedure is sometimes known as Kronecker segmentation (see section). Shortly after the discovery of Karatsuba's algorithm, which uses three evaluation points, Toom generalised it so as to use evaluation points instead, for any 2>. This leads to the bound =O/log r>|)>> for fixed . Letting grow slowly with , he also showed that =O>|)>>. The algorithm was adapted to the Turing model by Cook and is now known as Toom--Cook multiplication. Schönhage obtained a slightly better bound by working modulo several numbers of the form -1> instead of using several polynomial evaluation points. Knuth proved that an even better complexity bound could be achieved by suitably adapting Toom's method. The next step towards even faster integer multiplication was the rediscovery of the fast Fourier transform (FFT) by Cooley and Tukey (essentially the same algorithm was already known to Gauss ). The FFT yields particularly efficient algorithms for evaluating and interpolating polynomials on certain special sets of evaluation points. For example, if is a ring in which is invertible, and if \R> is a principal >-th root of unity (see section for detailed definitions), then the FFT permits evaluation and interpolation at the points ,\,\-1>> using only |)>> ring operations in . Consequently, if and are polynomials in > whose product has degree less than>, then the product can be computed using |)>> ring operations as well. In, Schönhage and Strassen presented two FFT-based algorithms for integer multiplication. In both algorithms, they first use Kronecker segmentation to convert the problem to multiplication of integer polynomials. They then embed these polynomials into > for a suitable ring and multiply the polynomials by using FFTs over . The first algorithm takes \> and =exp*\/2|)>>, and works with finite-precision approximations to elements of >. Multiplications in > itself are handled recursively, by treating them as integer multiplications (after appropriate scaling). The second algorithm, popularly known as Schönhage--Strassen algorithm, takes /|m*\|\>> where >+1> is aFermatnumber. This algorithm is the faster of the two, achieving the bound =O>. It benefits from the fact that =2> is a principal >-th root of unity in, and that multiplications by powers of> can be carried out efficiently, as they correspond to simple shifts and negations. At around the same time, Pollard pointed out that one can also work with /|m*\|\>> where is a prime of the form +1>, since then >> contains primitive >-th roots of unity (although he did not give a bound for>). Schönhage and Strassen's algorithm remained the champion for more than thirty years, but was recently superseded by Fürer's algorithm. In short, Fürer managed to combine the advantages of the two algorithms from, to achieve the bound =O> n|)>>|)>>. Fürer's algorithm is based on the ingenious observation that the ring />+1|)>> contains a small number of ``fast'' principal >-th roots of unity, namely the powers of , but also a large supply of much higher-order roots of unity inherited from >. To evaluate an FFT over , he decomposes it into many ``short'' transforms of length at most >, using the Cooley--Tukey method. He evaluates the short transforms with the fast roots of unity, pausing occasionally to perform ``slow'' multiplications by higher-order roots of unity (``twiddle factors''). A slightly subtle point of the construction is that we really need, for large , a principal >-th root of unity \R>> such that >=X>. In it was shown that the technique from to compute modulo suitable prime numbers of the form +1> can be adapted to Fürer's algorithm. Although the complexity of this algorithm is essentially the same as that of Fürer's algorithm, this method has the advantage that it does not require any error analysis for approximate numerical operations in >. ||||||>|>3000 BC>|>||)>>>>||>||)>>>>||>|2>|)>>>>||>|>*|)>>>>||>|>*log n|)>>>>||>|>>>||>|> n|)>>|)>>>>|||> n>|)>>>>>>>|Historical overview of known complexity bounds for -bit integer multiplication.> Throughout the paper, integers are assumed to be handled in the standard binary representation. For our computational complexity results, we assume that we work on a Turing machine with afinite but sufficiently large number of tapes. The Turing machine model is very conservative with respect to the cost of memory access, which is pertinent from a practical point of view for implementations of FFT algorithms. Nevertheless, other models for sequential computations could be considered. For practical purposes, parallel models might be more appropriate, but we will not consider these in this paper. Occasionally, for polynomial arithmetic over abstract rings, we will also consider algebraic complexity measures4>. In section, we start by recalling several classical techniques for completeness and later use: sorting and array transposition algorithms, discrete Fourier transforms (DFTs), the Cooley--Tukey algorithm, FFT multiplication and convolution, Bluestein's chirp transform, and Kronecker substitution and segmentation. In section, we also provide the necessary tools for the error analysis of complex Fourier transforms. Most of these tools are standard, although our presentation is somewhat , being based on fixed point arithmetic. In section, we describe a simplified version of the new integer multiplication algorithm, without any attempt to minimise the aforementioned constant . As mentioned in the sketch above, the key idea is to reduce a given DFT over > to a collection of ``short'' transforms, and then to convert these short transforms back to integer multiplication by a combination of Bluestein's chirp transform and Kronecker substitution. The complexity analysis of Fürer's algorithm and the algorithm from section involves functional inequalities which contain post-compositions with logarithms and other slowly growing functions. In section, we present a few systematic tools for analysing these types of inequalities. For more information on this quite particular kind of asymptotic analysis, we refer the reader to. In section, we present an optimised version of the algorithm from section, proving in particular the bound =O> n>|)>> (Theorem), which constitutes the main result of this paper. In section, we outline a similar complexity analysis for Fürer's algorithm. Even after several optimisations of the original algorithm, we were unable to attain a bound better than =O> n>|)>>. This suggests that the new algorithm outperforms Fürer's algorithm by a factor of > n>>. This speedup is surprising, given that the short transforms in Fürer's algorithm involve only shifts, additions and subtractions. The solution to the paradox is that Fürer has made the short transforms . Indeed, they are so fast that they make a negligible contribution to the overall complexity, and his computation is dominated by the ``slow'' twiddle factor multiplications. In the new algorithm, we push more work into the short transforms, allowing them to get slightly slower; the is that we avoid the factor of two in zero-padding caused by Fürer's introduction of artificial ``fast'' roots of unity. The optimal strategy is actually to let the short transforms dominate the computation, by increasing the short transform length relative to the coefficient size. Fürer is unable to do this, because in his algorithm these two parameters are too closely linked. To underscore just how far the situation has been inverted relative to Fürer's algorithm, we point out that in our presentation we can get away with using Schönhage--Strassen for the twiddle factor multiplications, without any detrimental effect on the overall complexity. We have chosen to base most of our algorithms on approximate complex arithmetic. Instead, following and, we might have chosen to use modular arithmetic. In section, we will briefly indicate how our main algorithm can be adapted to this setting. This variant of our algorithm presents several analogies with its adaptation to polynomial multiplication over finite fields. The question remains whether there exists an even faster algorithm than the algorithm of section. In an earlier paper, Fürer gave another algorithm of complexity > n|)>>|)>> under the assumption that there exist sufficiently many Fermat primes, i.e., primes of the form =2>+1>. It can be shown that a careful optimisation of this algorithm yields the bound =O> n>|)>>. Unfortunately, odds are high that > is the largest Fermat prime. In section, we present an algorithm that achieves the bound =O> n>|)>> under the more plausible conjecture that there exist sufficiently many Mersenne primes (Theorem). The main technical ingredient is a variant of an algorithm of Crandall and Fagin that permits efficient multiplication modulo -1>, despite not being divisible by a large power of two. It would be interesting to know whether the new algorithms could be useful in practice. We have implemented an unoptimised version of the algorithm from section in the system and found our implementation to be an order of magnitude slower than the library. There is certainly room for improvement, but we doubt that even a highly optimised implementation of the new algorithm will be competitive in the near future. Nevertheless, the variant for polynomial multiplication over finite fields presented in seems to be a promising avenue for achieving speedups in practical computations. This will be investigated in a forthcoming paper. <\render-remark|Notations> We use Hardy's notations g> for >, and g> for > and >. The symbol >> denotes the set of non-negative real numbers, and > denotes |}>>. We will write |log n/log 2|\>>. This section recalls basic facts on Fourier transforms and related techniques used in subsequent sections. For more details and historical references we refer the reader to standard books on the subject such as. In the Turing model, we have available a fixed number of linear tapes. An \\\n> array ,\,i>> of -bit elements is stored as a linear array of *\*n*b> bits. We generally assume that the elements are ordered lexicographically by ,\,i|)>>, though this is just an implementation detail. What is significant from a complexity point of view is that occasionally we must switch representations, to access an array (say 2-dimensional) by ``rows'' or by ``columns''. In the Turing model, we may transpose an \n> matrix of -bit elements in time *n*lg min,n|)>|)>>, using the algorithm of. Briefly, the idea is to split the matrix into two halves along the ``short'' dimension, and transpose each half recursively. We will also require more complex rearrangements of data, for which we resort to sorting. Suppose that is a totally ordered set, whose elements are represented by bit strings of length, and suppose that we can compare elements of in time >. Then an array of elements of may be sorted in time > using merge sort , which can be implemented efficiently on aTuring machine. Let be a commutative ring with identity and let 1>. An element \R> is said to be a -th root of unity> if =1> and <\equation> |)>=0 for all ,n-1|}>>. In this case, we define the (or DFT) of an tuple ,\,a|)>\R> with respect to > to be >==,\,|)>\R> where <\eqnarray*> >|>|+a*\+\+a*\*i>.>>>> That is, > is the evaluation of the polynomial \a+a*X+\+a*X> at >. If > is aprincipal -th root of unity, then so is its inverse =\>, and we have <\eqnarray*> >>|)>>||>>> Indeed, writing DFT>>|)>>, the relation() implies that <\equation*> b=*\=a*\>=a*\>=a*|)>=n*a, where =1> if and =0> otherwise. <\remark> In all of the new algorithms introduced in this paper, we actually work over afield, whose characteristic does not divide . In this setting, the concept of principal root of unity coincides with the more familiar . The more general ``principal root'' concept is only needed for discussions of other algorithms, such as the Schönhage--Strassen algorithm or Fürer's algorithm. Let > be a principal -th root of unity and let *n> where n\n>. Then >> is aprincipal >-th root of unity and >> is a principal >-th root of unity. Moreover, for any \,n-1|}>> and \,n-1|}>>, we have <\eqnarray*> *n+i>>||=0>-1>=0>-1>a*n+k>*\*n+k|)>**n+i|)>>>>|||=0>-1>\*i>*=0>-1>a*n+k>*>|)>*i>|)>*>|)>*i>.>>>> If > and > are algorithms for computing DFTs of length > and >, we may use to construct an algorithm \\> for computing DFTs of length as follows. For each \,n-1|}>>, the sum inside the brackets corresponds to the >-th coefficient of aDFT of the >-tuple +k>,\,a-1|)>*n+k>|)>\R>> with respect to >>. Evaluating these requires > calls to >. Next, we multiply by the *i>\>, at a cost of operations in . (Actually, fewer than multiplications are required, as some of the twiddle factors are equal to . This optimisation, while important in practice, has no asymptotic effect on the algorithms discussed in this paper.) Finally, for each \,n-1|}>>, the outer sum corresponds to the >-th coefficient of a DFT of an >-tuple in >> with respect to >>. These require > calls to >. Denoting by > the number of ring operations needed to compute a DFT of length , and assuming that we have available a precomputed table of twiddle factors, we obtain <\eqnarray*> *n|)>>|>|*|)>+n*|)>+n.>>>> For a factorisation *\*n>, this yields recursively <\eqnarray*> >|>|>*|)>+*n.>>>> The corresponding algorithm is denoted \\\\>. The > operation is neither commutative nor associative; the above expression will always be taken to mean \\|)>\\|)>\\|)>\\>. Let > be the butterfly algorithm that computes a DFT of length 2 by the formula ,a|)>\+a,a-a|)>>. Then k>\\\\\\> computes a DFT of length 2> in time |)>=O>. Algorithms of this type are called (or FFTs). The above discussion requires several modifications in the Turing model. Assume that elements of are represented by bits. First, for \\>, we must add a rearrangement cost of ,n|)>>|)>> to efficiently access the rows and columns for the recursive subtransforms (see section). For the general case \\\\\>, the total rearrangement cost is bounded by b*n*lg n|)>=O>. Second, we will sometimes use algorithms to compute the subtransforms, so it may not make sense to express their cost in terms of >. The relation therefore becomes <\eqnarray*> >|>|>*|)>+*n*+O,>>>> where > is the (Turing) cost of a transform of length over , and where > is the cost of asingle multiplication in . Finally, we point out that \\> requires access to a table of twiddle factors *i>>, ordered lexicographically by ,i|)>>, for i\n>, i\n\>. Assuming that we are given as input aprecomputed table of the form ,\,\>, we must show how to extract the required twiddle factor table in the correct order. We first construct a list of triples ,i,i*i|)>>, ordered by ,i|)>>, in time >; then sort by *i> in time n|)>> (see section); then merge with the given root table to obtain a table ,i,\*i>|)>>, ordered by *i>, in time |)>>; and finally sort by ,i|)>> in time |)>>. The total cost of the extraction is thus |)>>. The corresponding cost for \\\\> is determined as follows. Assuming that the table ,\,\> is given as input, we first extract the subtables of *\*n>|)>-th roots of unity for ,2> in time *\*n+\+n*n|)>*|)>=O|)>>. Extracting the twiddle factor table for the decomposition *\*n|)>\n> then costs *\*n*lg n*|)>>; the total over all is again |)>>. <\remark> An alternative approach is to compute the twiddle factors directly in the correct order. When working over >, as in section, this requires a slight increase in the working precision. Similar comments apply to the root tables used in Bluestein's algorithm in section. Let > be a principal -th root of unity in and assume that is invertible in . Consider two polynomials +\+a*X> and +\+b*X> in>. Let +\+c*X> be the polynomial defined by <\eqnarray*> |>|*DFT>>*DFT>|)>,>>>> where the product of the DFTs is taken pointwise. By construction, we have =*>, which means that |)>=A|)>*B|)>> for all ,n-1|}>>. The product +\+s*X> of and modulo -1> also satisfies |)>=A|)>*B|)>> for all. Consequently, =*>, >|)>/n=c>, whence . For polynomials R> with n> and n>, we thus obtain an algorithm for the computation of modulo -1> using at most +O> operations in . Modular products of this type are also called . If \n>, then we may recover the product from its reduction modulo -1>. This multiplication method is called . If one of the arguments (say ) is fixed and we want to compute many products (or cyclic convolutions) for different , then we may precompute >>, after which each new product can be computed using only +O> operationsin . We have shown above how to multiply polynomials using DFTs. Inversely, it is possible to reduce the computation of DFTs of arbitrary length, not necessarily a power of two to polynomial multiplication , as follows. Let > be a principal -th root of unity. For simplicity we assume that is even, and that there exists some \R> with =\>. Consider the sequences <\equation*> f\\>,g\\>. Then =f*f*g>, so for any R> we have <\equation> =a*\=f**f|)>*g. Also, since is even, <\equation*> g=\>=\-n-2*n*i>=\>*\+i|)>*n>=g. Now let f*a+\+f*a*X>, g+\+g*X> and c+\+c*X\F*G> modulo -1>. Then() implies that =f*c> for all ,n-1|}>>. In other words, the computation of a DFT of even length reduces to acyclic convolution product of the same length, together with > additional operations in . Notice that the polynomial is fixed and independent of in this product. The only complication in the Turing model is the cost of extracting the > in the correct order, i.e., in the order ,\,\,\,\>>, given as input a precomputed table ,\,\,\>. We may do this in time |)>> by applying the strategy from section to the pairs mod 2*n|)>> for i\n>. Similar remarks apply to the >. <\remark> It is also possible to give variants of the new multiplication algorithms in which Bluestein's transform is replaced by a different method for converting DFTs to convolutions, such as Rader's algorithm . Multiplication in > may be reduced to multiplication in > using the classical technique of 8.27>. More precisely, let 0> and 0>, and suppose that we are given two polynomials \> of degree less than , with coefficients > and > satisfying |\|>\2> and |\|>\2>. Then for the product we have |\|>\2>. Consequently, the coefficients of may be read off the integer product |)>=A|)>*B|)>> where 2*n+lg d+2>. Notice that the integers |)>|\|>> and |)>|\|>> have bit length at most , and the encoding and decoding processes have complexity >. The inverse procedure is . Given 0> and 0>, and non-negative integers 2> and 2>, we may reduce the computation of a*b> to the computation of aproduct A*B> of two polynomials \> of degree less than , and with |\|>\2> and |\|>\2> where |n/d|\>>. Indeed, we may cut the integers into chunks of bits each, so that |)>>, |)>> and |)>>. Notice that we may recover from using an overlap-add procedure in time |)>=O>. In our applications, we will always have >, so that =O>. Kronecker substitution and segmentation can also be used to handle Gaussian integers (and Gaussian integer polynomials), and to compute cyclic convolutions. For example, given polynomials \|]>/-1|)>> with |\|>,|\|>\2>, then for we have |\|>\2>, so we may recover from the cyclic Gaussian integer product |)>=A|)>*B|)>\/-1|)>*\|)>|]>>, where 2*n+lg d+2>. In the other direction, suppose that we wish to compute for some /-1|)>*\|)>|]>>. We may assume that the ``real'' and ``imaginary'' parts of and are non-negative, and so reduce to the problem of multiplying \|]>/-1|)>>, where |)>> and |)>>, and where the real and imaginary parts of ,B\\|]>> are non-negative and have at most bits. In this section, we consider the computation of DFTs over > in the Turing model. Elements of > can only be represented approximately on a Turing machine. We describe algorithms that compute DFTs approximately, using a fixed-point representation for >, and we give complexity bounds and a detailed error analysis for these algorithms. We refer the reader to for more details about multiple precision arithmetic. For our complexity estimates we will freely use the standard observation that |)>=O|)>>, since the multiplication of two integers of bit length k*n> reduces to > multiplications of integers of bit length n>, for any fixed 1>. We will represent fixed point numbers by a signed mantissa and a fixed exponent. More precisely, given a precision parameter 4>, we denote by > the set of complex numbers of the form *2>, where =u+v*\> for integers and satisfying +v\2>, i.e., \1>. We write *2> for the set of complex numbers of the form \>, where \> and \>; in particular, for \*2> we always have \2>. At every stage of our algorithms, the exponent will be determined implicitly by context, and in particular, the exponents do not have to be explicitly stored or manipulated. In our error analysis of numerical algorithms, each \*2> is really the approximation of some genuine complex number \\>. Each such comes with an implicit error bound \0>; this is areal number for which we can guarantee that |\|>\\>. We also define the relative error bound for by \\/2>. We finally denote by \2\1/8> the ``machine accuracy''. <\remark> Interval arithmetic (or ball arithmetic) provides asystematic method for tracking error bounds by storing the bounds along with . We will use similar formulas for the computation of > and >, but we will not actually store the bounds during computations. In this section we give error bounds and complexity estimates for fixed point addition, subtraction and multiplication, under certain simplifying assumptions. In particular, in our DFTs, we only ever need to add and subtract numbers with the same exponent. We also give error bounds for fixed point convolution of vectors; the complexity of this important operation is considered later. For \>, we define the ``round towards zero'' function |x|\>> by |x|\>\|x|\>> if 0> and |x|\>\|x|\>> if 0>. For \>, we define |x+y*\|\>\|x|\>+|y|\>*\>. Notice that |z|\>|\|>\> and |z|\>-z|\|>\> for any \>. <\proposition> Let \*2>. Define the fixed point sum and difference u,z\u\\*2> by u>\|\m|)>/2|\>>. Then u> and u> can be computed in time>, and <\eqnarray*> u>>|>|+\|2>+\.>>>> <\proof> We have <\equation*> u|)>-u|)>|\|>|2>=|\m|2>|\>-\m|2>|\|>*2\\2\\ and <\equation*> u|)>-\|)>|\|>|2>\+\|2>=+\|2>, whence u|)>-\|)>|\|>/2\+\|)>/2+\>. <\proposition> Let \*2>> and \*2>>. Define the fixed point product u\\*2+e>> by u>\|2*m*m|\>>. Then u> can be computed in time |)>>, and <\eqnarray*> u>>|>||)>*|)>*|)>.>>>> <\proof> We have <\equation*> u-z*u|\|>/2+e>=|2*m*m|\>-2*m*m|\|>*2\\2\\ and <\eqnarray*> *|\|>>|>|*|\|>+|\|>*+-u|\|>|)>>>||>|>*\+2>*\+\*\>>|||+\+\*\|)>*2+e>.>>>> Consequently, u-*|\|>/2+e>\\+\+\*\+\\|)>*|)>*|)>-1>. Proposition may be generalised to numerical cyclic convolution of vectors as follows. <\proposition> Let 1> and 2>. Let *2>|)>> and *2>|)>>. Define the fixed point convolution u\*2+e+k>|)>> by <\equation*> mu|)>>\|2*+i=i >m>>*m>>|\>,0\i\n. Then <\eqnarray*> u|)>>|)>>|>| >|)>*max >|)>*|)>.>>>> <\proof> Let > denote the exact convolution, and write \max \>> and \max \>>. As in the proof of Proposition, we obtain u|)>-u|)>|\|>/2+e+k>\\2\\> and <\eqnarray*> u|)>-\|)>|\|>>|>|+i=i >>*u>->*>|\|>>>||>|+\+\*\|)>*2+e+k>.>>>> The proof is concluded in the same way as Proposition. Let \\\:y\0|}>> and \\\:y\0|}>>. Let >>:\\\> be the branch of the square root function such that *\>>\\*\/2>> for \\\>. Using Newton's method and Schönhage--Strassen multiplication, we may construct a fixed point square root function >|>||0.25ex||>>:\\\>, which may be evaluated in time >, such that >||0.25ex||>>-|\|>\\> for all \\>. For example, we may first compute some \> such that |\|>\\/4> and \1>, and then take >||0.25ex||>>\|2*u|\>*2>; the desired bound follows since /4+\2\\>. <\lemma> Let \>, and assume that |\|>=1> and \3/8>. Then >||0.25ex||>>>\\+\>. <\proof> The mean value theorem implies that >-|\|>\\*maxD>|)>|\|>> where \:\\|}>>. For D> we have \|\|>--z|\|>-\1-3/8-3/8\1/4>; hence >-|\|>\\=\>. By construction >||0.25ex||>>-|\|>\\>. We conclude that >||0.25ex||>>->|\|>\\+\>. <\proposition> Let \> and k>, and let \\*\/2>>. We may compute ,\,\,\-1>\\>, with >\\> for all , in time *p*log p*log log p|)>>. <\proof> It suffices to compute ,\,\-1>\\>. Starting from =1> and >=\>, for each =k-3,k-4,\,0>, we compute >>> for ,2-1>-1> using >>\+1>>|>||0.25ex||>>> if 2-2>> and >>\\*\>-2>> otherwise. Performing all computations with temporarily increased precision \p+lg p+2> and corresponding \2>>, Lemma yields >\k*\\\/4>. This also shows that the hypothesis >\3/8> is always satisfied, since /4\1/32\3/8>. After rounding to bits, the relative error is at most /4+\2\\>. A algorithm for computing DFTs of length \2> is a numerical algorithm that takes as input an tuple \*2|)>> and computes an approximation >\*2|)>> to the DFT of with respect to =\*\/n>> (or =\*\/n>> in the case of an inverse transform), such that <\eqnarray*> >|)>>|>| >|)>*|)>.>>>> We assume for the moment that any such algorithm has at its disposal all necessary root tables with relative error not exceeding >. Propositions and directly imply the following: <\proposition> The butterfly algorithm > that computes a DFT of length using the formula ,a|)>\\a,a\a|)>> is tight. <\proof> We have >\>+\>|)>/2+\\max \>+\\ \>|)>*|)>-1>. <\proposition> Let ,k\1>, and let > and > be tight algorithms for computing DFTs of lengths >> and >>. Then \\> is a tight algorithm for computing DFTs of length +k>>. <\proof> The inner and outer DFTs contribute factors of |)>-2>> and |)>-2>>, and by Proposition the twiddle factor multiplications contribute a factor of |)>>. Thus <\equation*> max >|)>\max >|)>*|)>-2|)>+2+-2|)>>\max >|)>*|)>+k|)>-2>. <\corollary> Let 1>. Then k>> is a tight algorithm for computing DFTs of length > over>, whose complexity is bounded by *k*|)>>. In this section we give the simplest version of the new integer multiplication algorithm. The key innovation is an alternative method for computing DFTs of small length. This new method uses acombination of Bluestein's chirp transform and Kronecker substitution (see sections and) to convert the DFT to a cyclic integer product in />-1|)>*\|)>|]>> for suitable >. <\proposition> Let r\p>. There exists a tight algorithm > for computing DFTs of length> over >, whose complexity is bounded by *p|)>+2*|)>>. <\proof> Let 2>, and suppose that we wish to compute the DFT of *2|)>>. Using Bluestein's chirp transform (notation as in section), this reduces to computing a cyclic convolution of suitable *2|)>/-1|)>> and \/-1|)>>. We assume that the > and> have been precomputed with >,\>\\>. We may regard \2*F> and \2*G> as cyclic polynomials with complex coefficients, i.e., as elements of |]>/-1|)>>. Write =F*X> and =G*X>, where ,G\\|]>> with |\|>\2> and |\|>\2>. Now we compute the product \F*G\\|]>/-1|)>> using Kronecker substitution. More precisely, we have |\|>\2\>, so it suffices to compute the cyclic integer product |)>=F|)>*G|)>\/-1|)>*\|)>|]>>, where 2*p+r+2=O>. Then H*2> is the exact convolution of and , and rounding to precision yields G\*2|)>/-1|)>> in the sense of Proposition. A final multiplication by> yields the Fourier coefficients \\*2>. To establish tightness, observe that >\>|)>*|)>> and >\\>, so Proposition yields G|)>>\|)>*|)>> where \max \>>; we conclude that >\|)>*|)>>. For 3>, this means that the algorithm is tight; for 2>, we may take\\r>>. For the complexity, observe that the product in /-1|)>*\|)>|]>> reduces to three integer products of size >. These have cost |)>>, and the algorithm also performs > multiplications in >, contributing the |)>> term. <\remark> A crucial observation is that, for suitable parameters, the DFT algorithm in Proposition is actually faster than the conventional Cooley--Tukey algorithm of Corollary. For example, if we assume that =m*>>, then to compute a transform of length over> with p>, the Cooley--Tukey approach has complexity *>\>, whereas Proposition yields *>>, an improvement by a factor of roughly . <\theorem> For \>, we have <\eqnarray*> |n*lg n>>|| n|)>|lg n*lg lg n>+|lg n*lg lg n>+1|)>.>>>> <\proof> We first reduce our integer product to a polynomial product using Kronecker segmentation (section). Splitting the two -bit inputs into chunks of lg n> bits, we need to compute aproduct of polynomials \> with non-negative -bit coefficients and degrees less than |n/b|\>=O>. The coefficients of u*v> have > bits, and we may deduce the desired integer product |)>> in time >. Let lg >. To compute , we will use DFTs of length =O> over >, where 2*b+2*k+lg k+8=O>. Zero-padding to obtain a sequence ,\,u-1>|)>\*2|)>>>, and similarly for , we compute the transforms ,\*2|)>>> with respect to \\*\/2>> as follows. Let lg lg n> and |k/r|\>=O>. Write +\+r> with \r> for d-1> and \k-*r\r>. We use the algorithm \\\\\\> (see section), where for i\d-1> we take > to be the tight algorithm > for DFTs of length \lg n> given by Proposition, and where > is r>> as in Corollary. In other words, we split the usual radix-2 layers of the FFT into groups of layers, handling the transforms in each group with the Bluestein--Kronecker reduction, and then using ordinary Cooley--Tukey for the remaining > layers. We next compute the pointwise products \*\\*2>, and then apply an inverse transform > defined analogously to >. A final division by > (which is really just an implicit adjustment of exponents) yields approximations \\*2>. Since > and > are tight by Propositions, and Corollary, we have >\|)>>, and similarly for >. Thus >\|)>>, so >\|)>\exp|)>\exp|)>\1+2> after the inverse transform (since 1+2*x> for 1>). In particular, >=2*\>\2\1/4>, so we obtain the exact value of > by rounding to the nearest integer. Now we analyse the complexity. Using Proposition, we first compute a table of roots ,\,\-1>> in time *p*log p*log log p|)>=O>, and then extract the required twiddle factor tables in time *k*|)>=O> (see section). For the Bluestein reductions, we may extract a table of >-th roots in time *p|)>=O>, and then rearrange them as required in time *r*|)>=O n*lg lg n|)>> (see section). These precomputations are then all repeated for the inverse transforms. By Corollary, Proposition and, each invocation of > (or >) has cost <\eqnarray*> ||*2**p|)>+2*|)>+2>*2>*r*+*2*+p*2*k|)>>>|||*2**p|)>+|)>*2*+p*2*k|)>>>|||* n|)>+*+n*lg n|)>.>>>> The cost of the |)>> pointwise multiplications is subsumed within this bound. It is now a straightforward matter to recover Fürer's bound. <\theorem> For some constant 1>, we have <\eqnarray*> >||> n>|)>.>>>> <\proof> Let \/> for 2>. By Theorem, there exists \2> and 1> such that <\eqnarray*> >|>| n|)>+T+1|)>>>>> for all x>. Let \4*log x> for \>, 1>. Increasing > if necessary, we may assume that \x-1> for x>, so that the function >\min\:\j>\x|}>> is well-defined. Increasing if necessary, we may also assume that \3*C> for all x>. \ We prove by induction on >> that \>+1>> for all . If >=0>, then x>, so the bound holds. Now suppose that >\1>. Since n\\>, we have >\\> n|)>\\>|)>=\>-1>, so by induction \C*>>+C*>>+C\>+1>>. Finally, since |)>\log x\>, we have >\2*log> x+O>, so =O> n>|)>> for >. This section is devoted to developing a framework for handling recurrence inequalities, similar to(), that appear in subsequent sections. Let :,\|)>\\> be a smooth increasing function, for some \\>. We say that >:,\|)>\\>>> is an of > if >> is increasing and if <\eqnarray*> >>||>|)>+1>>>> for all sufficiently large . For instance, the standard iterated logarithm >>> defined in() is an iterator of >. An analogous iterator may be defined for any smooth increasing function :,\|)>\\> for which there exists some \x> such that \x-1> for all \>. Indeed, in that case, <\eqnarray*> >>|>|\:\k>\\|}>>>>> is well-defined and satisfies() for all \>. It will sometimes be convenient to increase > so that \x-1> is satisfied on the whole domain of >. We say that > is if there exists an\\> such that <\eqnarray*> \>\\\exp\>|)>>||>>>> for \>. For example, the functions >, , > and > are logarithmically slow, with =0,1,2,3> respectively. <\lemma> Let :,\|)>\\> be a logarithmically slow function. Then there exists \x> such that \x-1> for all \>. Consequently all logarithmically slow functions admit iterators. <\proof> The case =0> is clear. For \1>, let \log\\\exp>. By induction \x-1> for large, so \exp=x/e\x-1> for large . In this paper, the main role played by logarithmically slow functions is to measure in multiplication algorithms. In other words, multiplication of objects of size will be reduced to multiplication of objects of size >, where \\> for some logarithmically slow function >. The following result asserts that, from the point of view of iterators, such functions are more or less interchangeable with . <\lemma> For any iterator >> of a logarithmically slow function >, we have <\eqnarray*> >>||> x+O.>>>> <\proof> First consider the case where =0> in , i.e., assume that -log x|\|>\C> for some constant 0> and all x>. Increasing > and if necessary, we may assume that >=\>|)>+1> for all x\>, and that \x>. We claim that <\eqnarray*> \x\2*y>|>|\\\2*log y>>>> for all 4*e>. Indeed, if \x\2*y>, then <\equation*> *log y\log -C\\|2>|)>\\\\\log +C\2*log y. Now, given any 4*\>, let min\:logk> x\4*\|}>>, so 1>. For any ,k-1> we have j> x\4*\>, so -fold iteration of , starting with , yields <\equation*> j> x|2>\\j>\2*logj> x\j\k|)>. Moreover this shows that j>\2*\\x> for j\k>, so >=\>k>|)>+k>. Since k>\2*logk> x\8*\> and > x+O\>, we obtain >=log> x+O>. Now consider the general case \0>. Let \\>>\\\\>>>, so that >\\>\\>>> is an iterator of>. By the above argument >=log> x+O>, and so >=\>\> x|)>=log>\> x|)>+O=log> x-\+O=log> x+O>. The next result, which generalises and refines the argument of Theorem, is our main tool for converting recurrence inequalities into actual asymptotic bounds for solutions. We state it in a slightly more general form than is necessary for the present paper, anticipating the more complicated situation that arises in . <\proposition> Let 1>, 0> and \\>. Let \exp\>>, and let :,\|)>\\> be alogarithmically slow function such that \x-1> for all x>. Then there exists a positive constant (depending on >, >, , and >) with the following property. Let \x> and 0>. Let \\>, and let \\>> be any function satisfying the following recurrence. First, \L> for all \>, \>. Second, for all \>, \>, there exist ,\,y\\> with \\>, and weights ,\,\\0> with \=1>, such that <\eqnarray*> >|>|\> y>|)>*\*T|)>+L.>>>> Then we have \C*L*K> y-log> \>> for all \>, \>. <\proof> Let >, , > and > be as above. Define >>\min\:\k>\\|}>> for x>. We claim that there exists \>, depending only on > and >, such that <\eqnarray*> >>>|>|> x-log> \+r>>>> for all \>. Indeed, let >\min\:\j>\x|}>>. First suppose \x>, so that >|)>\1>. For any \>, we have >>-1|)>>\\>, so <\equation*> \>>-1+\>|)>-1|)>>\\>|)>-1|)>>|)>\x, and hence >\\>>+\>|)>-2\>. This last inequality also clearly holds if =x> (since -2>). By Lemma we obtain >>\\>-\>|)>+O=log> x-log> \+O>. Define a sequence of real numbers ,E,\> by the formula <\eqnarray*> >|>|||j\r+\,>>|-1|)>>>||j\r+\.>>>>>>>>> We claim that <\eqnarray*> \> x>|>|>>>>>>> for all \>. Indeed, let \>>>. If r+\> then holds as \\x\exp\>>. If r+\> then > x\j-r> by , so exp>> and hence \> x\exp-1|)>>>. Now let \>. We will prove by induction on \>>> that <\eqnarray*> >|>|*\*E*L*+\+K+1|)>>>>> for all x>. The base case 0>, i.e., \>, holds by assumption. Now assume that 1>, so \>. By hypothesis there exist ,\,y\\>, \\>, and ,\,\\0> with \=1>, such that <\eqnarray*> >|>|*\*T|)>+L.>>>> Since >>|)>\\>>|)>=\>>-1>, we obtain <\eqnarray*> >|>|*\**\*E*L*+\+K+1|)>|)>+L>>|||*\*E*L*+\+K+K|)>+L>>||>|*\*E*L*+\+K+K+1|)>.>>>> Finally, the infinite product <\equation*> E\1>E\>*0>k>>|)> certainly converges, so we have \E*L*K/> for x>. Setting E*K/>, by we obtain \C*L*K> y-log> \>> for all \>. In this section, we present an optimised version of the new integer multiplication algorithm. The basic outline is the same as in section, but our goal is now to minimise the ``expansion factor'' at each recursion level. The necessary modifications may be summarised as follows. <\itemize> Since Bluestein's chirp transform reduces a DFT to a complex cyclic convolution, we take the basic recursive problem to be complex cyclic integer convolution, i.e., multiplication in /|-1|)>*\|\>|)>|]>\>, rather than ordinary integer multiplication. In multiplications involving one fixed operand, we reuse the transform of the fixed operand. In a convolution of length with input coefficients of bit size , the size of the output coefficients is >, so the ratio of output to input size is /b|)>>. We increase from to >, so as to reduce the inflation ratio from > to >. We increase the ``short transform length'' from to >>. The complexity then becomes dominated by the Bluestein--Kronecker multiplications, while the contribution from ordinary arithmetic in > becomes asymptotically negligible. (As noted in section, this is precisely the opposite of what occurs in Fürer's algorithm.) We begin with a technical preliminary. To perform multiplication in /|-1|)>*\|\>|)>|]>> efficiently using FFT multiplication, we need to be divisible by a high power of two. We say that an integer 3> is if >\n>, where \lg n-lg n|)>+1> (note that \\lg n> for all 3>). We will need a function that rounds a given up to an admissible integer. For this purpose we define \|n/2>|\>*2>> for 3>. Note that > may be computed in time >. <\lemma> Let 3>. Then > is admissible and <\equation> n\\\n+ n>. <\proof> We have \\n+2>>, which implies. Since >\2>> and \lg n>, we have |n/2>|\>\2>> and thus \2>, i.e., =lg n>. In particular |)>=\>, so > is admissible. (In fact, one easily checks that > is the admissible integer n>). <\remark> It is actually possible to drop the requirement that be divisible by a high power of two, by using the Crandall--Fagin method (see section). We prefer to avoid this approach in this section, as it adds an unnecessary layer of complexity to the presentation. Now let be admissible, and consider the problem of computing 1> products *v,\,u*v>> with ,\,u>,v\/|-1|)>*\|\>|)>|]>>>, i.e., products with one fixed operand. Denote the cost of this operation by >. Our algorithm for this problem will perform forward DFTs and inverse DFTs, so it is convenient to introduce the normalisation <\eqnarray*> >|>|1> |2*t+1>.>>>> This is well-defined since clearly \t*>. Roughly speaking, > may be thought of as the notional cost of a single DFT. The problem of multiplying -bit integers may be reduced to the above problem by using zero-padding, i.e., by taking \> and 1>. Since =O> and \3*>, we obtain \3*|)>+O>. Thus it suffices to obtain a good bound for >. The recursive step in the main multiplication algorithm involves computing ``short'' DFTs via the Bluestein--Kronecker device. As pointed out in section, this leads to acyclic convolution with one fixed operand. To take advantage of the fixed operand, let |)>> denote the cost of computing independent DFTs of length > over >, and let |)>\sup1> |)>/>. Then we have the following refinement of Proposition. As usual we assume that the necessary Bluestein root table has been precomputed. <\proposition> Let 3>, and assume that > divides \\*2|)>>. Then there exists a tight algorithm > for computing DFTs of length > over >, with <\eqnarray*> |)>>|>||)>+O*|)>.>>>> <\proof> We use the same notation and algorithm as in the proof of Proposition, except that in the Kronecker substitution we take n/2\2*p+r+2>, so that the resulting integer multiplication takes place in /|>-1|)>*\|\>|)>|]>>. The proof of tightness is identical to that of Proposition (this is where we use the assumption 3>). For the complexity bound, note that > is admissible by construction, so for any 1> we have |)>\|)>+O*|)>.> Here we have used the fact that > is fixed over all these multiplications. Dividing by and taking suprema over 1> yields the result. The next result gives the main recurrence satisfied by > (compare with Theorem). <\theorem> There exists \3> and a logarithmically slow function :,\|)>\\> with the following property. For all admissible x\>, there exists an admissible \\> such that <\eqnarray*> |n*lg n>>|>||)>|)>*|)>|n*lg n>+O.>>>> <\proof> Let be admissible and sufficiently large, and consider the problem of computing 1> products *v,\,u*v>, for ,\,u>,v\/|-1|)>*\|\>|)>|]>>>. Let \\lg n>, so that \n>, and let n/2\lg n>. We cut the inputs into > chunks of size , i.e., if is one of the inputs, we write +w*2+\+w-1>*2-1|)>*b>>, where \\|]>>, and where the real and imaginary parts of > have absolute value at most >. Thus |\|>\\2\2\>, and for any b+1> we may encode as a polynomial *2|)>/>-1|)>>. We will multiply the desired (cyclic) polynomials by using DFTs of length > over > where 2*b+2*k+lg k+10=O n|)>>. We construct the DFTs in a similar way to section. Let > and |k/r|\>=O|)>>. Write +\+r> with \r> for d-1> and \k-*r\r>. We use the tight algorithm \\\\\\>, where for i\d-1> we take > to be the tight algorithm > for DFTs of length > given by Proposition, and where > is r>> as in Corollary. Thus, for the first groups of layers, we use Bluestein--Kronecker to reduce to complex integer convolution of size \\*2|)>>, and the remaining layers are handled using ordinary Cooley--Tukey. We write > for the analogous inverse transform. To check the hypothesis of Proposition, we observe that \n> for sufficiently large , as > is divisible by>> where \lg n-lg n|)>+1>, and <\equation*> 2>\|lg n>\*2|lg *2|)>>\|>\|>*2\2. Denote by > the cost of a single invocation of > (or >). By Corollary and, we have <\eqnarray*> >|>|*>|)>+O>*2>*r*|)>+O*|)>+O*k*b|)>.>>>> The last term is the rearrangement cost, and simplifies to >. The second term covers the invocations of >, and simplifies to *|)>>, so is absorbed by the *> term. The first term covers the invocations of >. By definition >|)>\2+1|)>*|)>>, and since \lg lg n>, Proposition yields <\eqnarray*> >|)>>|>||)>*2*|)>+O*|)>.>>>> Thus <\eqnarray*> >|>||)>*d*2*|)>+O*|)>+O.>>>> We will use Schönhage--Strassen's algorithm for fixed point multiplications in >. Since n|)>>, we may take =O n*lg lg n*lg lg lg n|)>>. Thus the *> term becomes <\equation*> O>* n>*lg n*lg lg n*lg lg lg n|)>=O|)>=O. (We could of course use our algorithm recursively for these multiplications; however, it turns out that Schönhage--Strassen is fast enough, and leads to simpler recurrences. In fact, the algorithm asymptotically spends more time rearranging data than multiplying in >!) Since *2=|)>*2=|)>*b*2>, and since |)>=r+O=|)>*r\lg lg n>, by Lemma we have <\eqnarray*> >|||)>*b*2,>>|>|||)>*r.>>>> We also have > and >, so <\eqnarray*> |||)>*k,>>||||)>*k/r.>>>> Thus <\equation*> d*2=*b|)>*d||)>>=|)>|)>* lg n>, and consequently <\eqnarray*> >|>||)>|)>**lg n>*|)>+O.>>>> To compute the desired products, we must execute forward transforms and inverse transforms. For each product, we must also perform |)>> pointwise multiplications in >, at cost *|)>=O>. As in the proof of Theorem, the cost of all necessary root table precomputations is also bounded by *|)>=O>. Thus we obtain <\eqnarray*> >|>|*+O.>>>> Dividing by *n*lg n> and taking suprema yields the bound(). The error analysis is almost identical to the proof of Theorem, the only difference being that is replaced by . Denoting one of the products by *2|)>/>-1|)>>, we have >\2> exactly as in Theorem. Thus >\2\1/4>, and again we obtain > by rounding to the nearest integer. Finally we show how to define >. We already observed that \r\>. Thus there exists a constant 0> such that \log log log log n+C> for large , so we may take \exp3>4> x+C|)>>. Now we may prove the main theorem announced in the introduction. <\render-proof|Proof of Theorem > Let > and > be as in Theorem. Increasing > if necessary, by Lemma we may assume that \x-1> for x>, and that \exp |)>>. Let \/> for admissible 3>. By the theorem, there exist constants 0> such that for all admissible x>, there exists an admissible \\> with <\eqnarray*> >|>||)>*T|)>+L.>>>> Increasing if necessary, we may also assume that \L> for all admissible x>. Taking > to be the set of admissible integers, we apply Proposition with 8>, \x>, \2>, and for each admissible x> setting 1>, \1>, n> and \n> as above. We conclude that =O> n>|)>>, and hence =O> n>|)>> as runs over admissible integers. We already pointed out that \3*|)>+O>. As pointed out in the introduction, Fürer proved that =O> n>|)>> for some 1>, but did not give an explicit bound for . In this section we sketch an argument showing that one may achieve in Fürer's algorithm, by reusing tools from previous sections, especially section. At the core of Fürer's algorithm is the ring />+1|)>>, which contains the principal >th root of unity . Note that is a direct sum of > copies of >, and hence not a field (for 2>). A crucial observation is that is a ``fast'' root of unity, in the sense that multiplication by and its powers can be achieved in linear time, as in Schönhage--Strassen's algorithm. For any r>, we need to construct a >-th root > of , which is itself a >-th principal root of unity. We recall Fürer's construction of > as follows. <\lemma> With as above, let =exp *\|2>> and =exp *\|2>>. Then \; <\eqnarray*> >|>|-1>\*i>|)>|i>-\|)>>\R>>>> is a principal >-th root of unity with >=X>. The coefficients of > have absolute value 1>. <\proof> See . As our basic recursive problem, we will consider multiplication in /+1|)>*\|)>|]>>, where is divisible by a high power of two. We will refer to the last property as ``admissibility'', but we will not define it precisely. We write > for the cost of 1> such products with one fixed argument, and \sup1> /> for the normalised cost, exactly as in section. Fürer worked with /+1|)>*\> rather than /+1|)>*\|)>|]>>, but, since we are interested in constant factors, and since the recursive multiplication step involves multiplication of complex quantities, it simplifies the exposition to work systematically with complexified objects everywhere.\ For suitable parameters and , we will encode elements of /+1|)>*\|)>|]>> as (nega)cyclic polynomials in />+1|)>>, where \/>+1|)>> as above. We choose the parameters later; for now we require only that > divides and that n/2\lg n> (so that the coefficients are not too small). The encoding proceeds as follows. Given \/+1|)>*\>, we split into > parts ,\,a-1>>> of > bits. Each > is cut into > even smaller pieces ,\,a-1>> of bits. Then is encoded as <\eqnarray*> >|>|-1>-1>a*X*Y,>>>> and an element \/+1|)>*\|)>|]>> is encoded as \+*\>. (Notice that the coefficients of > are zero for \j\2>; this zero-padding is the price Fürer pays for introducing artificial roots of unity.) We represent complex coefficients by elements of *2> for a suitable precision parameter . The exponent varies during the algorithm, as explained in; nevertheless, additions and subtractions only occur for numbers with the same exponent, as in the algorithms from sectionsand. Given /+1|)>*\|)>|]>>, to successfully recover the product from the polynomial product *\R/>+1|)>>, we must choose 2*b+k+r+h>, where is an allowance for numerical error. Certainly k\lg n>, and, as shown by Fürer, we may also take > (an analogous conclusion is reached in sectionsand). Thus we may assume that >. We must now show how to compute a product *\>, for ,\R/>+1|)>>. Fürer handles these types of multiplications using ``half-DFTs'', i.e., DFTs that evaluate at odd powers of>, where \R> is a principal >-th root of unity such that >=X> (Lemma). To keep terminology and notation consistent with previous sections, we prefer to make the substitution \*Y|)>>, i.e., writing =-1>*Y>, we put *\|)>*Y>, and similarly for > and . This reduces the problem to computing the product in />-1|)>>. The change of variable imposes a cost of *|)>>, where > is the cost of a multiplication in . So now consider a product , where R/>-1|)>>. Let \\>, so that >=X>. Let |k/r|\>>, and write +\+r> with \r> for d-1> and \k-*r\r>. For each >, let > be the algorithm for DFTs of length >> that applies the usual Cooley--Tukey method, taking advantage of the fast >>-th root of unity>>.> The complexity of > is +r>*r*p|)>>, since it performs >*r|)>> linear-time operations on objects of bit size *p|)>>. Let > be the complexity of the algorithm \\\\\\> for DFTs of length> over . Then yields <\eqnarray*> >|>|2>*2+r>*r*p|)>+||\>*2*+O,>>>> The first term is bounded by *2*r*p|)>=O*p|)>*k|)>=O>, since >. Let us now consider the second term |k/r|\>*2*>, which describes the cost of the twiddle factor multiplications. This term turns out to be the dominant one. Both Kronecker substitution and FFT multiplication may be considered for multiplication in, but it turns out that Kronecker substitution is faster (a similar phenomenon was noted in Remark). So we reduce multiplication in to multiplication in />+1|)>*\|)>|]>> where \2*> is admissible and divisible by >. For any reasonable definition of admissibility we then have =|)>*2*p>, provided that is somewhat smaller than . (In the interests of brevity, we will not specify the > terms for the remainder of the argument. They can all be controlled along the lines of section.) Most of the twiddle factors are reused many times, so we will assume that =|)>*|)>>, where the factor counts the two (rather than three) DFTs needed for each multiplication of size>. The term of interest then becomes <\eqnarray*> ||\>*2*>|||)>***p*k|n*lg n>*|)>.>>>> Since =|)>|)>*b> and *b=4*n>, this yields <\eqnarray*> >|>||)>*|)>|)>***lg n>*|)>+O.>>>> To minimise the leading constant, we must choose to grow faster than , and to grow faster than . For example, taking > and lg n-r-lg n|)>> leads to \lg n> and lg b\lg lg n>. The function mapping to > is then bounded by a logarithmically slow function, and a similar argument to section shows that =O> n>|)>>. Shortly after Fürer's algorithm appeared, De et al presented a variant based on modular arithmetic that also achieves the complexity bound =O> n>|)>> for some 1>. Roughly speaking, they replace the coefficient ring > with the field > of adic numbers, for asuitable prime. In this context, working to ``finite precision'' means performing computations in /p>*\>, where \1> is a precision parameter. The main advantage of this approach is that the error analysis becomes trivial; indeed /p>*\> is a ring (unlike our >), and arithmetic operations never lead to precision loss (unless one divides by , which never happens in these algorithms). The main disadvantage is that there are certain technical difficulties associated with finding an appropriate ; this is discussed in section below. The aim of this section is to sketch an analogue of the algorithm of section that achieves =O> n>|)>> using modular arithmetic instead of >. We assume familiarity with -adic numbers, referring the reader to for an elementary introduction. For the basic problem, we take multiplication in /|-1|)>*\|\>>, where is admissible (in the sense of section) and where one of the arguments is fixed over 1> multiplications. As before, we take \>, and cut the inputs into chunks of n/2=O n|)>> bits. Thus we reduce to multiplying polynomials in />-1|)>> with coefficients of at most bits. The coefficients of the product have at most bits. Let be a prime such that >>, so that > contains a primitive >-th root of unity>. The problem of finding such and > is discussed in the next section; for now we assume only that >. We may then embed the multiplication problem into />-1|)>>, and use DFTs with respect to > to compute the product. On a Turing machine, we cannot represent elements of > exactly, so we perform all computations in /p>*\> where <\eqnarray*> >|>||-1>|\>.>>>> This choice ensures that >|)>\2*b+k>, so knowledge of the product in /p>*\|)>/>-1|)>> determines it unambiguously in />-1|)>>. To compute each DFT, we first use the Cooley--Tukey algorithm to decompose it into ``short transforms'' of length >, where >. (As in section, there are also residual transforms of length >\> for some \r>, whose contribution to the complexity is negligible.) Multiplications in /p>*\\>, such as the multiplications by twiddle factors, are handled using Schönhage--Strassen's algorithm, with the divisions by >> being reduced to multiplication via Newton's method. We then use Bluestein's algorithm to convert each short transform to a cyclic convolution of length > over /p>*\\>, and apply Kronecker substitution to convert this to multiplication in />-1|)>*\>, where> is the smallest admissible integer exceeding **lg p+r|)>>. This multiplication is then handled recursively. Now, since >, k>, lg n> and >, we have =|)>*b/lg p>, and hence =|)>*b*2\>, just as in section. The rest of the complexity analysis follows exactly as in the proof of Theorem, except for the computation of and >, which is considered below. <\remark> The role of the precision parameter > is to give some extra flexibility regarding the choice of . If there was an efficient way to find a prime >> larger than > (but not too much larger), and an efficient way to find a suitable >-th root of unity modulo , then we could always take \1> and obtain an algorithm working directly over the finite field >. and >> Given a transform length > for 1>, our aim is to find a prime such that >\>, i.e., such that> divides . Denote by > the smallest such prime. Heath-Brown has conjectured that =O*k|)>> , but given the current state of knowledge in number theory, we are only able to prove a result of the following type. <\lemma> For all sufficiently large we have \2>, and we may compute> in time *k>|)>>. <\proof> This is a special case of Linnik's theorem, which states that there exist constants and such that for any \> with =1>, there exists a prime number > with C*b>. The best currently known estimate 5.2> for is due to Xylouris. Applying this result for and >, we get the bound 2> for large enough . The complexity bound follows by testing +1,2\2+1,3\2+1,\> for primality until we find , using apolynomial time primality test. The difficulty with this result already noted in is that the time required to find greatly exceeds the time bound we are trying to prove for >! To avoid this problem, De et al suggested using a multivariate splitting, i.e., by encoding each integer as a polynomial in ,\,X|]>> for suitable , say 7>. One then uses dimensional DFTs to multiply the polynomials. Since the transform length is shorter, one can get away with a smaller . Unfortunately, this introduces further zero-padding and leads to a larger value of , ruining our attempt to achieve the bound > n>|)>>. On the other hand, we note that the problem only really occurs at the top recursion level. Indeed, at deeper recursion levels, there is available at the previous level to compute . So one possible workaround is to use a different, sufficiently fast algorithm at the top level, such as Fürer's algorithm, and then switch to the algorithm sketched in section for the remaining levels. In this way one still obtains the bound > n>|)>>, and asymptotically almost all of the computation is done using the algorithm of section. If one insists on avoiding > entirely, there are still many choices: one could use the algorithm of De et al at the top level, or use a multivariate version of the algorithm of section. One could even use the Schönhage--Strassen algorithm, whose main recursive step yields the bound =O*|)>+n*log n|)>>; applying this three times gives =O*|)>+n*log n|)>>, and then to multiply integers with > bits, one can find a suitable prime using Lemma in time >|)>=O>. Another way to work around the problem is to assume the generalised Riemann hypothesis (GRH). De et al pointed out that under GRH, it is possible to find a suitable prime efficiently using a randomised algorithm. Here we show that, under GRH, we can even use deterministic algorithms. <\lemma> Assume GRH. Then =O*k|)>>, and we may compute> in time *k>|)>>. <\proof> The first bound is given in , and the complexity bound follows similarly to the proof of Lemma. To use this result, we must modify the algorithm of section slightly. Choose aconstant 3> so that we can compute > in time *k|)>>, as in Lemma. Increase the coefficient size from > to >, and change the definition of admissibility accordingly. The transform length then decreases to =O|)>>, and the cost of computing decreases to only >. The rest of the complexity analysis is essentially unchanged; the result is an algorithm with complexity > n>|)>>, working entirely with modular arithmetic, in which the top recursion level does not need any special treatment. Finally, we consider the computation of a suitable approximation to a >-th root of unity in >. <\lemma> Given \1> and a prime >\>, we may find |~>\\/p>*\> such that |~>=\ >>> for some primitive >-th root of unity \\>, in time >+*log p|)>>|)>> for any \0>. <\proof> We may find a generator of /p*\|)>>> deterministically in time >|)>> . Then |~>=g/2>> is a primitive >-th root of unity in /p*\>, and there is a unique primitive >-th root of unity \\> congruent to |~>> modulo . Given |~>>, we may compute >>> using fast Newton lifting in time *log p|)>>|)>> 12.3>. In the context of section, we may assume that =O>|)>> and >, so the cost of finding > is >|)>>. This is certainly less than the cost of finding itself, using either Lemma or Lemma. It is natural to ask whether the approaches from sections, or can be further optimised, to obtain a complexity bound =O> n>|)>> with 8>. In Fürer's algorithm, the complexity is dominated by the cost of multiplications in />+1|)>>. If we could use asimilar algorithm for a much simpler , then we might achieve abetter bound. Such an algorithm was actually given by Fürer, under the assumption that there exist sufficiently many Fermat primes, i.e., primes of the form =2>+1>. More precisely, his algorithm requires that there exists a positive integer such that for every \>, the sequence ,\,F>> contains a prime number. The DFTs are then computed directly over >> for suitable, taking advantage of the fact that >> contains a fast >-th primitive root of unity (namely the element 2) as well as a>>-th primitive root of unity. It can be shown that a suitably optimised version of this hypothetical algorithm achieves : we still pay a factor of two due to the fact that we compute both forward and inverse transforms, and we pay another factor of two for the zero-padding in the recursive reduction. Unfortunately, it is likely that =65537> is the last Fermat prime . In the algorithm of section, a potential bottleneck arises during the short transforms, when we use Kronecker substitution to multiply polynomials in />-1|)>>>. We really only need the high bits of each coefficient of the product (i.e., of the real and imaginary parts), but we are forced to allocate roughly bits per coefficient in the Kronecker substitution, and then we discard roughly half of the output. This problem is similar to the well-known obstruction that prevents us from using FFT methods to compute a ``short product'', i.e., the high bits or low bits of the product of two bit integers, any faster than computing the full bits. In this section, we present a variant of the algorithm of section, in which the coefficient ring> is replaced by a finite field |]>>, where -1> is a Mersenne prime. Thus ``short products'' are replaced by ``cyclic products'', namely by multiplications modulo -1>. This saves a factor of two at each recursion level, and consequently reduces from to . This change of coefficient ring introduces several technical complications. First, it is of course unknown if there are infinitely many Mersenne primes. Thus we are forced to rely on unproved conjectures about the distribution of Mersenne primes. Second, is always prime (except possibly at the top recursion level). Thus we cannot cut up an element of /p*\> into equal-sized chunks with an integral number of bits, and still expect to take advantage of cyclic products. In other words, is very far from being admissible in the sense of section6. To work around this, we deploy a variant of an algorithm of Crandall and Fagin, which allows us to work with chunks of varying size. The Crandall--Fagin algorithm was originally presented over >, and depended crucially on the fact that > contains suitable roots of. In our setting, we work over >|]>\\|)>>>, where =2>-1> is a Mersenne prime exponentially smaller than . Happily, >> contains suitable roots of , and this enables us to adapt their algorithm to our setting. Moreover, since |)>-1=2+1>*-1>-1|)>>, the field >|]>> contains roots of unity of high power-of-two order, namely of order +1>>, so we can perform FFTs over >|]>> very efficiently. Finally, we can no longer use Kronecker substitution, as this would reintroduce the very zero-padding we are trying to avoid. Instead, we take our basic problem to be multiplication over /p*\|)>|]>> (where -1> is not necessarily prime). After the Crandall--Fagin splitting step, we have a multiplication problem over >|]>>, which is solved using 2-dimensional FFTs over >|]>>. These FFTs are in turn reduced to 1dimensional FFTs using standard methods; this dimension reduction is, roughly speaking, the analogue of Kronecker substitution in this algorithm. (Indeed, it is also possible to give an algorithm along these lines that works over > but avoids Kronecker substitution entirely; this still yields because of the ``short product'' problem mentioned above.) For the 1dimensional transforms, we use the same technique as in previous sections: we use Cooley--Tukey's algorithm to decompose them into ``short transforms'' of exponentially shorter length, then use Bluestein's method to convert them to (univariate) polynomial products, and finally evaluate these products recursively. Let > denote the number of Mersenne primes less than . Based on probabilistic arguments and numerical evidence, Lenstra, Pomerance and Wagstaff have conjectured that <\eqnarray*> >|>|>|log 2>*log log x>>>> as \>, where =0.5772>> is the Euler constant. Our fast multiplication algorithm relies on the following slightly weaker conjecture. <\conjecture> There exist constants a\b> such that for all 3>, <\equation*> a*log log x\\\b*log log x. <\proposition> Assume Conjecture and let b/a>. For any integer 2>, there exists a Mersenne prime -1> in the interval \p\2>>. Given , we may compute the smallest such , and find a primitive >-th root of unity in |]>>, in time |)>*c>|)>>. <\proof> The required prime exists since for 2> we have <\equation*> \>|)>\a*log log >|)>=a*c*log n+a*log log 2\b*log n+b*log log 2=b*log log|)>\\|)>. An integer of the form -1> may be tested for primality in time >> using the Lucas--Lehmer primality test. A simple way to compute is to apply this test successively for all ,|n|\>|}>>; this takes time |)>*c>|)>>. A primitive >-th root of unity > may be computed by the formula \2>+>*\\\|]>> in time >|)>>; see or5>. Let -1> be a Mersenne number (not necessarily prime). The main integer multiplication algorithm depends on avariant of Crandall and Fagin's algorithm that reduces multiplication in /|p*\|\>|)>|]>/-1|)>> to multiplication in >|]>/-1,Y-1|)>>>, where =2>-1> is a suitably smaller Mersenne prime (assuming that such aprime exists). To explain the idea of this reduction, we first consider the simpler univariate case, in which we reduce multiplication in /|p*\|\>|)>|]>> to multiplication in>|]>/-1|)>>. Here we require that q>, that |)>=1> and that \2*|q/N|\>+lg N+3>. For any \>, we will write =,k-1|}>> and =,\,k-1|}>>. Assume that we wish to compute the product of /|p*\|\>|)>|]>>. Considering and as elements of |]>> modulo , we decompose them as <\equation> u=u*2>,v=v*2>, where <\eqnarray*> >|>||q*i/N|\>,>>|,v>|>|-e>>|]>.>>>> We regard > and > as complex ``digits'' of and , where the base -e>> varies with the position. Notice that -e> takes only two possible values: |q/N|\>> or |q/N|\>>. For i\N>, let <\eqnarray*> >|>|-q*i\,>>>> so that c\N>. For any i,i\N>, define ,i>\\> as follows. Choose \> so that i+i-\*N> lies in the interval i\N>, \ and put <\eqnarray*> ,i>>|>|>+e>-e-\*q.>>>> From(), we have <\equation*> c>+c>-c=N*>+e>-e|)>-q*+i-i|)>=N*\,i>. Since the left hand side lies in the interval >, this shows that ,i>\>. Now, since =1 > and >+e>=e+\,i> >, we have <\equation*> u*v==0>=0>u>*v>*2>+e>>=|w*2>|\> , where <\eqnarray*> >|>|+i=i >2,i>>*u>*v>.>>>> Since >|\|>\\2|q/N|\>>> and similarly for >>, we have \\|q/N|\>+1>*N>|]>>. Note that we may recover from ,\,w> in time \>, by a standard overlap-add procedure (provided that >). Let be the inverse of > modulo ; this inverse exists since we assumed |)>=1>. Let \2\\>>, so that <\equation*> \=2=2, since has order > in >>. The quantity > plays the same role as the real th root of appearing in Crandall--Fagin's algorithm. Now define polynomials \>|]>/-1|)>> by \\>*u> and \\>*v> for i\N>, and let +\+W*Y\U*V> be their (cyclic) product. Then <\equation*> \\>*W=+i=i >\>*U>*V>=\>+c>-c>*u>*v>=2,i>>*u>*v> coincides with the reinterpretation of > as an element of >|]>>. Moreover, we may recover > unambiguously from >, as \2*|q/N|\>+lg N+3> and \\|q/N|\>+1>*N>|]>>. Altogether, this shows how to reduce multiplication in /|p*\|\>|)>|]>> to multiplication in >|]>/-1|)>>. <\remark> The pair ,c|)>> can be computed from ,c|)>> in > bit operations, so we may compute the sequences ,\,e> and ,\,c> in time >. Moreover, since -c> takes on only two possible values, we may compute the sequence >,\,\>> using > multiplications in >|]>>. Generalising the discussion of the previous section, we now show how to reduce multiplication in /|p*\|\>|)>|]>/-1|)>>, for a given 1>, to multiplication in >|]>/-1,Y-1|)>>. For this, we require that q>, that |)>=1> and that \2*|q/N|\>+lg +3>. Indeed, consider two cyclic polynomials +\+u*X> and +\+v*X> in /|p*\|\>|)>|]>/-1|)>>. We cut each of the coefficients ,v\/|p*\|\>|)>|]>> into chunks > and > of bit size at most |q/N|\>>, using the same varying base strategy as above. With =2> and > as before, we next form the bivariate cyclic polynomials <\equation*> U\u*\>*X*Y,V\v*\>*X*Y in >|]>/-1,Y-1|)>>. Setting <\eqnarray*> |>|w*\>*X*Y,>>>> the same arguments as in the previous section yield <\eqnarray*> >||+i=i >+j=j >2,j>>*u,j>*v,j>.>>>> Using the assumption that \2*|q/N|\>+lg +3>, we recover the coefficients >, and hence the product , from the bivariate cyclic convolution product . Let 2> and 2-1> (not necessarily prime). We will take our basic recursive problem to be multiplication in /|p*\|\>|)>|]>/-1|)>> for suitable . We need somewhat larger than ; this is analogous to the situation in section, where we chose a ``short transform length'' somewhat larger than the coefficient size. Thus we set \2>> where > is defined as follows. <\lemma> There exists an increasing function :\\\> such that <\equation> 0\\- q|)>* log q|)>\2 for all 2>, and such that we may compute > in time >>. <\proof> Let \ q|)>* log q|)>>. Using, we may construct a function > such that -f|\|>\1/q> for all 2>, and which may be computed in time >>. One checks that -f\2/q> for all 2>, so \f-\f-\f+\g> for 2>. Thus > is increasing, and \|g+3/2|\>> has the desired properties. We say that an integer 2> is if it is of the form where M> for some 2>. (This should not be confused with the notion of admissibility of section.) An element of /|p*\|\>|)>|]>/-1|)>> is then represented by bits. Note that q*M> is strictly increasing, so there is a one-to-one correspondence between integers 2> and admissible . For 2> we define > to be the smallest admissible integer x>. <\lemma> We have =O> as \>. Given 2>, we may compute >, and the corresponding , in time >. <\proof> From we have *M/|)>=O-\>|)>=O>; this immediately implies that =O>. Suppose that we wish to compute > for some . We assume that is large enough that the definition \2|lg n/|\>>> makes sense and so that \2>. One checks that q|)>* log q|)>\lg n>, so |)>\lg n> and hence *M|)>\n>. To find the smallest suitable, we may simply compute > for each ,q>, and compare with . This takes time *|)>>|)>=o>. Now let 2>, 2-1> and M>. Consider the problem of computing 1> products *v,\,u*v> with ,\,u>,v\/|p*\|\>|)>|]>/-1|)>>. We denote by > the complexity of this problem, where q*M> is the admissible integer corresponding to . As in section, we define \sup1> />. Notice that multiplication of two integers of bit size k> reduces to the above problem, for , via a suitable Kronecker segmentation. Indeed, let \=q*M> for some , and encode the integers as integer polynomials of degree less than with coefficients of bit size |k/|\>>. The desired product may be recovered from the product in /|p*\|\>|)>|]>/-1|)>>, as <\equation*> 2*m+lg \+\\+\\q-1 for large . Thus, as in section, we have \3*|)>+O>, and it suffices to obtain a good bound for >. Now suppose additionally that -1> is . In this case /|p*\|\>|)>|]>=\|]>> is a field, and as noted above, it contains >-th roots of unity, so we may define DFTs of length > over |]>> for any q+1>. In particular, for q> we may use Bluestein's algorithm to compute DFTs of length >. Denote by |)>> the cost of evaluating independent DFTs of length > over |]>>, and put |)>\sup1> |)>/>. Here we assume as usual that a >-th root of unity is known, and that the corresponding Bluestein root table has been precomputed. Let us apply these definitions in the case lg M>; this is permissible, as q> for sufficiently large . Since convolution of length over |]>> is exactly the basic recursive problem, and since one of the operands is fixed, we have \+O|)>>, where q*M>, and hence <\eqnarray*> >|>|+O|)>.>>>> <\theorem> Assume Conjecture. Then there exists \2> and a logarithmically slow function :,\|)>\\> with the following property. For all admissible x\>, there exists an admissible \\> such that <\eqnarray*> |n*lg n>>|>||)>|)>*|)>|n*lg n>+O.>>>> <\proof> Let q*M> with >. Assume that we wish to compute 1> products with one fixed operand. Our goal is to reduce to a problem of the same form, but for exponentially smaller . Let =2>-1> be the smallest Mersenne prime larger than >>. By Proposition, we have >\p\2>>, whence \q\>, for some absolute constant 1>. Moreover, we may compute >, together with a primitive +1>>-th root of unity > in >|]>>, in time |)>*c>|)>=O>. We define \M|)>> and \q*M>. The algorithm must perform various multiplications in >|]>>, at cost |)>|)>>. For simplicity we will use Schönhage--Strassen's algorithm for these multiplications, i.e., we will take |)>=O*lg q*lg lg q|)>>. Since =O=O\>, we have <\eqnarray*> |)>>||*lg lg n*lg lg lg n|)>.>>>> We use the framework of section to reduce the basic multiplication problem in /|p*\|\>|)>|]>/-1|)>> to multiplication in >|]>/-1,Y-1|)>> for suitable . We take 2>*s> where <\eqnarray*> |>|>|*lg lg q>|)>,>>||>||>*-lg q|)>>|\>+1.>>>> We also write 2>>. The definition of makes sense for large since \\>. Let us check that the hypotheses of section are satisfied for large . We have q/*lg lg q|)>> and hence lg lg q>; in particular, q>, so |)>=1>, and also q/q\q/lg q>. Since 2*q/-lg q|)>>, we also have |q/N|\>\q-lg q+O>, and thus |q/N|\>+lg +3\q> since =O>. We also note for later use the estimate <\eqnarray*> >|||)>|)>*n.>>>> Indeed, since lg lg q> we have <\eqnarray*> |||)>|)>*>*-lg q|)>>,>>>> and we already noticed earlier that q|)>/q=O|)>=O>. To assess the cost of the Crandall--Fagin reduction, we note that computing the > and > costs =O> (see Remark), the splitting itself and final overlap-add phase require time >, and the various multiplications by >, >> and >> have cost |)>|)>=O|)>/q|)>=O>. Next we reduce multiplication in >|]>/-1,Y-1|)>> to multiplication in /-1,Z-1|)>>, where \\>|]>/-1|)>>. In fact, since =1>, these rings are isomorphic, via the map that sends to and to . Evaluating this isomorphism corresponds to rearranging the coefficients according to the rule ,i|)>>, where ,N-1|}>> is the exponent of and where \i mod L> and \i mod s> are the exponents of and . This may be achieved in time +lg N|)>|)>=O> using the same sorting strategy as in section. The inverse rearrangement is handled similarly. For multiplication in /-1,Z-1|)>>, we will use bivariate DFTs over >. This is possible because >|]>> contains both th and -th primitive roots of unity, namely +1>/M>> and +1>/L>>, since \lg M> and \lg L>. More precisely, we must perform forward bivariate DFTs and inverse bivariate DFTs of length L> over>, and multiplications in >. Each bivariate DFT reduces further to univariate DFTs of length over >|]>> (with respect to ) and univariate DFTs of length over >|]>> (with respect to ). Interspersed between these steps are various matrix transpose operations of total cost *q|)>=O>, to enable efficient access to the ``rows'' and ``columns'' (see section). Multiplications in > are handled by zero-padding, i.e., we first use Cooley--Tukey to multiply in >|]>/|lg s|\>+1>>-1|)>>, and then reduce modulo -1>. The total cost of these multiplications is |)>|)>=O|)>/q|)>=O|)>=O>. Consider one of the ``long'' univariate DFTs of length \> over >|]>>. We decompose the DFT into ``short'' DFTs of length > as follows. Let lg M=O> and |k/r|\>=O|)>>, and write +\+r> where \r> for i\d-1> and \k-*r\r>. We use the algorithm \\\\\\>, where for i\d-1> we take > to be the algorithm based on Bluestein's method (discussed immediately before), and where> is the usual Cooley--Tukey algorithm over >|]>>. Let > be the cost of a single invocation of> (or of the corresponding inverse transform >). By we have <\eqnarray*> >|>|*,2>|)>+O>*2>*r*|)>|)>+O*|)>|)>+O*q*lg n|)>.>>>> The cost of precomputing the necessary root tables is only *|)>|)>>. By definition ,*2>|)>\2+1|)>*>|)>>. From and the estimate \lg lg n>, the first term becomes <\eqnarray*> *,2>|)>>|>||)>**2*|)>+O*M*|)>|)>.>>>> The contribution to > from all terms involving |)>> is <\equation*> O*+d|)>*|)>|)>=O**q*lg lg n*lg lg lg n|)>=O*q*lg n|)>, so <\eqnarray*> >|>||)>**2*|)>+O*q*lg n|)>.>>>> Denoting by > the cost of a bivariate DFT of length L> over >, we thus have (ignoring the transposition costs, which were included earlier) <\eqnarray*> >||+s*M*>>||>||)>|)>*|>|\>*>+s*M*|>|\>*>|)>*|)>+O*lg n|)>>>||>||)>|)>*s*L*M*|M*lg M>*|)>+O*lg n|)>>>||>||)>|)>**lg M>*|)>+O.>>>> Moreover, since <\equation*> |lg M>=1+|lg M>=1+O>|)>=1+O|)>\, we get <\eqnarray*> >|>||)>|)>**lg n>*|)>+O.>>>> We must perform bivariate DFTs; the bound then follows exactly as in the proof of Theorem. For large , we have =O=O>, so =log q+O|)>|)>=O*log log q|)>=O>. Thus there exists a constant 0> such that \log log log log n+C> for large , and we may take \exp3>4> x+C|)>>. <\summarized-plain> <\render-proof|Proof of Theorem > Follows from Theorem and Proposition, analogously to the proof of Theorem. <|summarized-plain> \<#423\>\<#43C\>\<#43D\>\<#43E\>\<#436\>\<#435\>\<#43D\>\<#438\>\<#435\> \<#43C\>\<#43D\>\<#43E\>\<#433\>\<#43E\>\<#437\>\<#43D\>\<#430\>\<#447\>\<#43D\>\<#44B\>\<#445\> \<#447\>\<#438\>\<#441\>\<#435\>\<#43B\> \<#43D\>\<#430\> \<#430\>\<#432\>\<#442\>\<#43E\>\<#43C\>\<#430\>\<#442\>\<#430\>\<#445\> / \<#41E\> \<#441\>\<#43B\>\<#43E\>\<#436\>\<#43D\>\<#43E\>\<#441\>\<#442\>\<#438\> \<#441\>\<#445\>\<#435\>\<#43C\>\<#44B\> \<#438\>\<#437\> \<#444\>\<#443\>\<#43D\>\<#43A\>\<#446\>\<#438\>\<#43E\>\<#43D\>\<#430\>\<#43B\>\<#44C\>\<#43D\>\<#44B\>\<#445\> \<#44D\>\<#43B\>\<#435\>\<#43C\>\<#435\>\<#43D\>\<#442\>\<#43E\>\<#432\>, \<#440\>\<#435\>\<#430\>\<#43B\>\<#438\>\<#437\>\<#443\>\<#44E\>\<#449\>\<#435\>\<#439\> \<#443\>\<#43C\>\<#43D\>\<#43E\>\<#436\>\<#435\>\<#43D\>\<#438\>\<#435\> \<#446\>\<#435\>\<#43B\>\<#44B\>\<#445\> \<#447\>\<#438\>\<#441\>\<#435\>\<#43B\> <\bibliography|bib|plain|mul.bib> <\bib-list|10> M.Agrawal, N.Kayal, and N.Saxena. PRIMES is in P. , 160(2):781--793, 2004. A.V. Aho, J.E. Hopcroft, and J.D. Ullman. . Addison-Wesley, 1974. L.I. Bluestein. A linear filtering approach to the computation of discrete Fourier transform. , 18(4):451--455, 1970. A.Bostan, P.Gaudry, and É. Schost. Linear recurrences with polynomial coefficients and application to integer factorization and Cartier-Manin operator. , 36:1777--1806, 2007. C.B. Boyer. . Princeton Univ. Press, first paperback edition, 1985. R.P. Brent. Fast multiple-precision evaluation of elementary functions. , 23(2):242--251, 1976. R.P. Brent and P.Zimmermann. . Cambridge University Press, 2010. P.Bürgisser, M.Clausen, and M.A. Shokrollahi. . Springer-Verlag, 1997. H.Cohen, G.Frey, R.Avanzi, Ch. Doche, T.Lange, K.Nguyen, and F.Vercauteren, editors. . Discrete Mathematics and its Applications. Chapman & Hall/CRC, Boca Raton, FL, 2006. S.A. Cook. . PhD thesis, Harvard University, 1966. J.W. Cooley and J.W. Tukey. An algorithm for the machine calculation of complex Fourier series. , 19:297--301, 1965. R.Crandall and B.Fagin. Discrete weighted transforms and large-integer arithmetic. , 62(205):305--324, 1994. R.Crandall and C.Pomerance. . Springer, New York, 2nd edition, 2005. R.Creutzburg and M.Tasche. Parameter determination for complex number-theoretic transforms using cyclotomic polynomials. , 52(185):189--200, 1989. A.De, P.P. Kurur, C.Saha, and R.Saptharishi. Fast integer multiplication using modular arithmetic. , 42(2):685--699, 2013. J.Écalle. . Hermann, collection: Actualités mathématiques, 1992. M.Fürer. On the complexity of integer multiplication (extended abstract). Technical Report CS-89-17, Pennsylvania State University, 1989. M.Fürer. Faster integer multiplication. In , pages 57--66, New York, NY, USA, 2007. ACM Press. M.Fürer. Faster integer multiplication. , 39(3):979--1005, 2009. M.Fürer. How fast can we multiply large integers on an actual computer? Technical report, >, 2014. J.vonzur Gathen and J.Gerhard. . Cambridge University Press, 2nd edition, 2002. F.Q. Gouvêa. -adic numbers. An introduction>. Universitext. Springer-Verlag, Berlin, 1993. T.Granlund etal. GMP, the GNU multiple precision arithmetic library. , 1991. Latest version 6.0.0 released in 2014. D.Harvey, J.vander Hoeven, and G.Lecerf. Faster polynomial multiplication over finite fields. Technical report, HAL, 2014. . D.R. Heath-Brown. Almost-primes in arithmetic progressions and short intervals. , 83(3):357--375, 1978. D.R. Heath-Brown. Zero-free regions for Dirichlet -functions, and the least prime in an arithmetic progression. , 64(2):265--338, 1992. M.T. Heideman, D.H. Johnson, and C.S. Burrus. Gauss and the history of the fast Fourier transform. , 34(3):265--277, 1985. J.vander Hoeven. , volume2 of , chapter Calcul analytique. CEDRAM, 2011. Exp. No. 4, 85 pages, >. J.vander Hoeven, G.Lecerf, B.Mourrain, etal. Mathemagix, 2002. . A.Karatsuba and J.Ofman. \<#423\>\<#43C\>\<#43D\>\<#43E\>\<#436\>\<#435\>\<#43D\>\<#438\>\<#435\> \<#43C\>\<#43D\>\<#43E\>\<#433\>\<#43E\>\<#437\>\<#43D\>\<#430\>\<#447\>\<#43D\>\<#44B\>\<#445\> \<#447\>\<#438\>\<#441\>\<#435\>\<#43B\> \<#43D\>\<#430\> \<#430\>\<#432\>\<#442\>\<#43E\>\<#43C\>\<#430\>\<#442\>\<#430\>\<#445\>. , 7:293--294, 1962. English translation in . A.Karatsuba and J.Ofman. Multiplication of multidigit numbers on automata. , 7:595--596, 1963. D.E. Knuth. , volume 2: Seminumerical Algorithms. Addison-Wesley, 1969. D.E. Knuth. , volume 3: Sorting and Searching. Addison-Wesley, Reading, MA, 1998. Yu.V. Linnik. On the least prime in an arithmetic progression I. The basic theorem. , 15(57):139--178, 1944. Yu.V. Linnik. On the least prime in an arithmetic progression II. The Deuring-Heilbronn phenomenon. , 15(57):347--168, 1944. R.E. Moore. . Prentice Hall, Englewood Cliffs, N.J., 1966. O.Neugebauer. . Brown Univ. Press, Providence, R.I., 1957. C.H. Papadimitriou. . Addison-Wesley, 1994. J.M. Pollard. The fast Fourier transform in a finite field. , 25(114):365--374, 1971. C.Pomerance. Recent developments in primality testing. , 3(3):97--105, 1980/81. C.M. Rader. Discrete Fourier transforms when the number of data samples is prime. , 56(6):1107--1108, June 1968. K.R. Rao, D.N. Kim, and J.J. Hwang. . Signals and Communication Technology. Springer-Verlag, 2010. I.S. Reed and T.K. Truong. The use of finite fields to compute convolutions. , IT-21:208--213, 1975. M.C. Schmeling. . PhD thesis, Université Paris-VII, France, 2001. A.Schönhage. Multiplikation groÿer Zahlen. , 1(3):182--196, 1966. A.Schönhage. Storage modification machines. , 9:490--508, 1980. A.Schönhage and V.Strassen. Schnelle Multiplikation groÿer Zahlen. , 7:281--292, 1971. I.Shparlinski. On finding primitive roots in finite fields. , 157(2):273--275, 1996. D.E. Smith. , volume2. Dover, 1958. A.L. Toom. The complexity of a scheme of functional elements realizing the multiplication of integers. , 4(2):714--716, 1963. A.L. Toom. \<#41E\> \<#441\>\<#43B\>\<#43E\>\<#436\>\<#43D\>\<#43E\>\<#441\>\<#442\>\<#438\> \<#441\>\<#445\>\<#435\>\<#43C\>\<#44B\> \<#438\>\<#437\> \<#444\>\<#443\>\<#43D\>\<#43A\>\<#446\>\<#438\>\<#43E\>\<#43D\>\<#430\>\<#43B\>\<#44C\>\<#43D\>\<#44B\>\<#445\> \<#44D\>\<#43B\>\<#435\>\<#43C\>\<#435\>\<#43D\>\<#442\>\<#43E\>\<#432\>, \<#440\>\<#435\>\<#430\>\<#43B\>\<#438\>\<#437\>\<#443\>\<#44E\>\<#449\>\<#435\>\<#439\> \<#443\>\<#43C\>\<#43D\>\<#43E\>\<#436\>\<#435\>\<#43D\>\<#438\>\<#435\> \<#446\>\<#435\>\<#43B\>\<#44B\>\<#445\> \<#447\>\<#438\>\<#441\>\<#435\>\<#43B\>. , 150:496--498, 1963. English translation in . S.Wagstaff. Divisors of Mersenne numbers. , 40(161):385--397, 1983. T.Xylouris. On the least prime in an arithmetic progression and estimates for the zeros of Dirichlet L-functions. , 1:65--91, 2011. <\initial> <\collection> <\references> <\collection> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |\>|?>> |\>|?>> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <\auxiliary> <\collection> <\associate|bib> Pap94 Furer2007 Furer2009 vdH:ffmul GaGe2002 Smi58 Neu57 Boy85 Kar62 Kar63 Toom63a Toom63b Cook66 Sch66 Kn69 CT65 HJB-gauss-fft SS71 Pol71 Furer2007 SS71 DeKuSaSa2013 Pol71 Neu57 Kar62 Kar63 Toom63a Toom63b Sch66 Kn69 SS71 Furer2007 Pap94 Sch80 Furer2014 BuClSh1997 Schm01 Ec92 Pol71 DeKuSaSa2013 vdH:ffmul Fur89 CF94 vdH:mmx GMP vdH:ffmul AhHoUl1974 BuClSh1997 GaGe2002 RaKiHw2010 BGS07 Knu-vol3 Bluestein1970 Rad-prime GaGe2002 BZ10 Moo66 vdH:jncf BZ10 SS71 vdH:ffmul Furer2009 Furer2009 DeKuSaSa2013 Gou-p-adic HB-almost Lin44a Lin44b Xyl11 AKS04 DeKuSaSa2013 HB-linnik Shparlinski1996 CFA+-handbook Fur89 CP05 CF94 Wag83 Pom-primality CP05 RT-convolutions CT89 Br76b Kar63 Toom63b <\associate|table> |n>-bit integer multiplication.|> <\associate|toc> |math-font-series||font-shape||1.Introduction> |.>>>>|> |1.1.Brief history and related work |.>>>>|> > |1.2.Our contributions and outline of the paper |.>>>>|> > |math-font-series||font-shape||2.Survey of classical tools> |.>>>>|> |2.1.Arrays and sorting |.>>>>|> > |2.2.Discrete Fourier transforms |.>>>>|> > |2.3.The Cooley--Tukey FFT |.>>>>|> > |2.4.Fast Fourier multiplication |.>>>>|> > |2.5.Bluestein's chirp transform |.>>>>|> > |2.6.Kronecker substitution and segmentation |.>>>>|> > |math-font-series||font-shape||3.Fixed point computations and error bounds> |.>>>>|> |3.1.Fixed point numbers |.>>>>|> > |3.2.Basic arithmetic |.>>>>|> > |3.3.Precomputing roots of unity |.>>>>|> > |3.4.Error analysis for fast Fourier transforms |.>>>>|> > |math-font-series||font-shape||4.A simple and fast multiplication algorithm> |.>>>>|> |math-font-series||font-shape||5.Logarithmically slow recurrence inequalities> |.>>>>|> |math-font-series||font-shape||6.Even faster multiplication> |.>>>>|> |math-font-series||font-shape||7.An optimised variant of Fürer's algorithm> |.>>>>|> |math-font-series||font-shape||8.Fast multiplication using modular arithmetic> |.>>>>|> |8.1.Sketch of the algorithm |.>>>>|> > |8.2.Computing suitable |p> and |\> |.>>>>|> > |math-font-series||font-shape||9.Conjecturally faster multiplication> |.>>>>|> |9.1.Mersenne primes |.>>>>|> > |9.2.Crandall and Fagin's algorithm revisited |.>>>>|> > |9.3.Bivariate Crandall--Fagin reduction |.>>>>|> > |9.4.Conjecturally faster multiplication |.>>>>|> > |math-font-series||font-shape||Bibliography> |.>>>>|>