Re: gaussian integer modulus / Pollard's rho method on gaussian integers
Bill Allombert <[email protected]> Thu, 27 Nov 2025 15:14:16 +0100
| Newsgroups | gmane.comp.mathematics.pari.user |
|---|---|
| Message-ID | <aShcuLZkC3kK2H0g@seventeen> |
On Thu, Nov 27, 2025 at 01:15:18PM +0100, [email protected] 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.