I was trying to figure out how I can perform multiplication of 2 big integers using FFT and convolutions, I ran into the following article:
http://numbers.computation.free.fr/Constants/Algorithms/fft.html
I understand the main points behind the algorithm but I can't understand this part:
2.3 More on the complexity of multiplication with FFT
In fact, the time complexity of multiplication with FFT is a little bigger than n log(n).
Let us be more precise.
To multiply two numbers of N digits, we write them in a base B which contains k digits (say B = $10^k$), thus giving a number of coefficients equal to n $\approx$ N/k.
The discussion above tells us that to multiply those two numbers, FFT permits to perform $O(n log(n))$ operations on basic numbers (basic numbers express coefficients in the base B, they are usually basic numerical data types like double in C of Fortran)
Because of the numerical error bound (1), these basic numbers should be precise enough to represent integers up to 6n2B2log(n) (for example, working in double precision, the base B should be choosen small enough so that the error bound is not too large... and this is not even possible if n is too large).
Thus the number of digits of these basic numbers should be of the order of log(B)+log(n). As a consequence, the basic operations on these numbers has cost O((log(B)+log(n))2) and the final cost is O( n log(n) (log(B) + log(n))2). The base B is choosen so that $k = log_{10}(B)$ is of the same order than log(n), and finally, multiplying those two numbers of $N \approx kn$ digits have cost $O( n log(n)^3 ) = O( N log(N)^2)$.
I need some clarification on how to write the numbers in a certain base B and why when $B = 10^k$ the base contains k digits in their example, it shouldn't contain $10^k$ digits? Such implementation should be recursive? I'll be grateful if someone can provide an example with numbers on how to execute this algorithm (without performing the FFT of course). thanks!