Re: New mulmod_bknp1

2022-02-22 Thread David Harvey
On Wed, 2022-02-23 at 09:53 +1100, David Harvey wrote: > On Tue, 2022-02-22 at 23:23 +0100, Marco Bodrato wrote: > > Ciao David, > > > > Il Mar, 22 Febbraio 2022 10:55 pm, David Harvey ha scritto: > > > On Tue, 2022-02-22 at 22:39 +0100, Marco Bodrato wrote: > > > > > E.g, in this case we could

Re: New mulmod_bknp1

2022-02-22 Thread David Harvey
On Tue, 2022-02-22 at 23:23 +0100, Marco Bodrato wrote: > Ciao David, > > Il Mar, 22 Febbraio 2022 10:55 pm, David Harvey ha scritto: > > On Tue, 2022-02-22 at 22:39 +0100, Marco Bodrato wrote: > > > > E.g, in this case we could try a top-level B^66 - 1 product, split in > > > > B^33+1 and

Re: New mulmod_bknp1

2022-02-22 Thread Marco Bodrato
Ciao David, Il Mar, 22 Febbraio 2022 10:55 pm, David Harvey ha scritto: > On Tue, 2022-02-22 at 22:39 +0100, Marco Bodrato wrote: >> > E.g, in this case we could try a top-level B^66 - 1 product, split in >> > B^33+1 and B^33-1; then the former suits your new algorithm well, but >> > the former

Re: New mulmod_bknp1

2022-02-22 Thread David Harvey
On Tue, 2022-02-22 at 22:39 +0100, Marco Bodrato wrote: > > > E.g, in this case we could try a top-level B^66 - 1 product, split in > > B^33+1 and B^33-1; then the former suits your new algorithm well, but > > the former can't be recursively split (at least not on a B boundary). If > > I fully

Re: New mulmod_bknp1

2022-02-22 Thread Marco Bodrato
Ciao, Il Mar, 22 Febbraio 2022 8:04 pm, Niels Möller ha scritto: > Marco Bodrato writes: >> Simply, if a multiplication mod B^{3n}+1 is needed, the code computes >> - a product mod B^{n}+1 >> - a product mod B^{2n}-B^{n}+1 >> - with CRT, the desired result is obtained. > Ok, and can the

Re: New mulmod_bknp1

2022-02-22 Thread Niels Möller
Marco Bodrato writes: > Nothing special... > Simply, if a multiplication mod B^{3n}+1 is needed, the code computes > - a product mod B^{n}+1 > - a product mod B^{2n}-B^{n}+1 > - with CRT, the desired result is obtained. Ok, and can the second product be computed more efficiently than full

Re: New mulmod_bknp1

2022-02-22 Thread Marco Bodrato
Ciao, Il 2022-02-21 01:37 Torbjörn Granlund ha scritto: I am too busy to examine the code to see what you've done. Perhaps you could outline the algorithms here? Nothing special... Simply, if a multiplication mod B^{3n}+1 is needed, the code computes - a product mod B^{n}+1 - a product mod