Unused code in mpn_mul_fft_decompose?
Paul.Zimmermann at inria.fr
Tue Mar 5 09:53:39 UTC 2019
> From: Mikhail Hogrefe <mikhailhogrefe at gmail.com>
> Date: Mon, 4 Mar 2019 21:44:50 -0500
> I was digging around in the GMP 6.1.2 source, and I noticed something in
> In mpn_mul_fft_decompose, there is an if statement checking 'dif > Kl',
> which is equivalent to 'nl > 2 * K * l'. But there is a comment above the
> function saying 'We must have nl <= 2*K*l.', suggesting that the first
> branch of the if is never taken.
> Maybe you're already aware of this, but if not I wanted to let you know.
> Mikhail Hogrefe
good remark. Indeed in the mul_fft.c file, it seems this code is dead.
However if mpn_mul_fft_decompose is exported, for example if one wants to
compute a product of two numbers modulo 2^n+1, where the two numbers have
more than 2n bits, then this branch might be useful.
Anyway this code is now obsolete (see  and ).
 https://gmplib.org/devel/ "This will largely depend on ongoing work on FFT
More information about the gmp-devel