Bill Allombert on Wed, 16 Aug 2017 00:37:30 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Speed up RgX_mul, RgX_sqr, RgX_divrem over Z, Fp, FpXQ

On Wed, Jun 07, 2017 at 09:12:55PM +0200, Bill Allombert wrote:
> Maybe it would be better to have functions RgX_mul_i etc.
> that does what RgX_mul is doing now, and change RgX_mul
> to do what you suggest.

I implemented that. Furthermore I added a framework that allows
RgX_mul/RgX_sqr to add support for most types.

Please check commit dcf58b3. 

Thanks for bringing this issue to our attention!

An example:

? P=random(2^100*a^11*x^1000)/100!*Mod(1,polcyclo(11,a));
? P^2;
? ##
  ***   last result computed in 732 ms.

instead of 1min, 27,785 ms.

This sligthly change the semantic of the multiplication.
Hopefully the new one is better.
It is also likely to exhibit bugs in pathological cases that were previously

To start with:
? (x+Mod(0,1))^0
%1 = Mod(1,1)