Bill Allombert on Thu, 27 Nov 2025 15:14:19 +0100


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

Re: gaussian integer modulus / Pollard's rho method on gaussian integers


On Thu, Nov 27, 2025 at 01:15:18PM +0100, hermann@stamm-wilbrandt.de wrote:
> Now with nfinit I get same disvisor:
> 
> ? C=nfinit(y^2+1);
> ? a=190+190*y;
> ? b=19+4*y;
> ? nfeltdiveuc(C,a,b)
> [12, 8]~
> ?
> 
> But how to get the modulus from that like in gimod2?
> 
> ? a-(12+8*y)*b
> -32*y^2 - 10*y - 38

Use 
? nfeltdivrem(C,a,b)
%4 = [[12,8]~,[-6,-10]~]

or 
? nfeltadd(C,a,-nfeltmul(C,b,q))
%11 = [-6,-10]~

(or use nfbasistoalg/nfalgtobasis to convert between both format).

Cheers,
Bill.