hermann on Tue, 27 May 2025 12:53:50 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: How to determine Mod(a,b) with t_COMPLEX b?
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: How to determine Mod(a,b) with t_COMPLEX b?
- From: hermann@stamm-wilbrandt.de
- Date: Tue, 27 May 2025 12:53:44 +0200
- Authentication-results: secure-mailgate.com; auth=pass smtp.auth=93.90.177.40@web103.dogado.net
- Delivery-date: Tue, 27 May 2025 12:53:50 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stamm-wilbrandt.de; s=cloudpit; t=1748343225; bh=tfQMuoumym9fJdNdDK2Ns0+YD4s5MN9KxGS0qSiJ3Zw=; h=Date:From:To:Subject:In-Reply-To:References:From; b=t4sN0MaRdZC92H3BjSCJlUGEQ6U/HBaZyY+wvPyXFl0VLFLUjBqg+GiVaNedWlx5y a/GqkxH7l56076zGwP7bJ+1pl0E9wT5i8o+B5J04Y6zTnde2LKNOY+KYIQ4WP8zeE+ 3rvMQfUVxLWeiEsRoE5exwCg5m2np00/iYtnF3Vg=
- In-reply-to: <aDTt9IfSWKWRzQWA@seventeen>
- References: <f121d6b8f9192b26f556ed13a8d49d06@stamm-wilbrandt.de> <aDTt9IfSWKWRzQWA@seventeen>
- User-agent: Roundcube Webmail/1.4.13
On 2025-05-27 00:40, Bill Allombert wrote:
The minimal residue of 1+4*I modulo 3+2*I is the yellow point -I in
the
example:
https://en.wikipedia.org/wiki/Gaussian_integer#Describing_residue_classes
How can minimal residue of an input gaussian integer modulo a gaussian
integer be computed in PARI/GP?
nf=nfinit(i^2+1)
a=1+4*i;b=3+2*i;
nfeltdivrem(nf,a,b)
%4 = [[1,1]~,[0,-1]~]
Cheers,
Bill.
Thank you, so the rem part is what I asked for.
Interesting, "i" is free variable and not sqrt(-1) which is "I" in GP.
Now that type(b) is t_POL, Mod(a,b) works as well.
What is the meaning of "-5" in Mod(a,b) result?
? a=1+4*i;b=3+2*i;
? Mod(a,b)
Mod(-5, 2*i + 3)
?
Regards,
Hermann.