Re: mpn_mulmod_bnm1

2014-04-02 Thread Torbjorn Granlund
ni...@lysator.liu.se (Niels Möller) writes: No immediate plans. To me, it seems stable enough, if documented together with mpn_mulmod_bnm1_itch and mpn_mulmod_bnm1_next_size. We should integrate the small primes FFT code,

Re: mpn_mulmod_bnm1

2014-04-02 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: We should integrate the small primes FFT code, https://gmplib.org/repo/gcd-nisse/file/0d591aa7e02c/mpn/generic/mul_spfft.c in the next major GMP release. Perhaps this would make mpn_mulmod_bnm1 trickier to maintain (at least as a cutting-edge

Re: mpn_mulmod_bnm1

2014-04-02 Thread Zimmermann Paul
ok I see we are far from a public mulmod_bnm1 interface. May I ask that in the meantime, you don't change the internal functions mpn_mul_fft, mpn_fft_best_k and mpn_fft_next_size, so that we can use them for the wrap-around trick (for example in GMP-ECM)? Paul

Re: mpn_mulmod_bnm1

2014-04-02 Thread Niels Möller
David Harvey d.har...@unsw.edu.au writes: The main problem with this approach is that there is not much granularity in the choice of r. In my code, I used some huristics like this: Start with r = 5, and choose the appropriate size k for the splitting into pieces, and transform size 2^n. Then