mul_fft, cleaning up some details of the code

Paul Zimmermann Paul.Zimmermann at inria.fr
Tue Mar 8 16:20:15 CET 2022


       Dear Marco,

> Uhm, the last line of code just before that ones is:
> 
>    cc = mpn_sub_1 (r, r, m, cc) + 1;
>    /* add 1 to cc instead of rd since rd might overflow */
> 
> So that I'd say that cc is 1 or 2.
> Then the case cc=2, m=n-1, r[m]=0, and rd=GMP_NUMB_MAX seems very very 
> unlikely, but possible.

it seems you are right!

Paul


More information about the gmp-devel mailing list