Bill Allombert on Tue, 27 May 2025 13:15:55 +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: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Tue, 27 May 2025 13:15:51 +0200
- Delivery-date: Tue, 27 May 2025 13:15:55 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=math.u-bordeaux.fr; s=2022; t=1748344553; bh=tnI7gikSiV0Zb/JYa03ibHdY3BOxvKV029i7exT0NLg=; h=Date:From:To:Subject:References:In-Reply-To:From; b=o3oWe8R66mYZpqDinBN54XOEeB3B0+omdPjciE/pwZKrFx6ai3w1XMjQS5XigzwFj EYkalWSG4hTkxtBdH9IF8/XH+nngSOrrMO7IVyHGtprW4cIGl0pyX9FYnnoefFy5+f qzdo8U7M8sqBJmC6zFrdFBfXfwZr2utc3g2DpkFCEfafvQSwvpiROUpAsa2c8VN6WX T2oUzcB3fQppDPicAlFp3bu4QSkVb7RJDYeZJL/hjQUnM4stikOJrcB9ffRjYsRQVk Sp5AmTJgE2xBDD4tUolhFsDKtMlJvzE3Xfusu8PBdTFGURSYsffK2Yf8JohlhO7FLf 04Kn1qUXoK28+CLW3dOixTCuDaxi5gjWo7DC/pMIv5sGMOYlmOckdbjJbNrn2y9klc m4s4troz5bO7sbmCmP7yzPV9V+tGFrJ9KBWe+p1nzdic5KqtNmbytyrbEqARnNj8NT cuc47Rc6cdomX1pmisHPoXAm7KaLOqazGy3JLUOg8OnxUMT7xncXpAHzEfczpsmfri 0j6tgvwHPudZaHpB8EO7YdXU8A42QsbAuTaYeRKWi/BwQP/183G+3/WxEpHYMl6f0B K+AFIzoUntZXd6tGrO3jo4HIHvGJHadv/j8kP9PXRaBA4f9c3gPE6JW1q90Dj8cUja rjr7YfNhD0MBvQekDlOuY9bw=
- In-reply-to: <900a289dcae383e44905e15d07e9b216@stamm-wilbrandt.de>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <f121d6b8f9192b26f556ed13a8d49d06@stamm-wilbrandt.de> <aDTt9IfSWKWRzQWA@seventeen> <900a289dcae383e44905e15d07e9b216@stamm-wilbrandt.de>
On Tue, May 27, 2025 at 12:53:44PM +0200, hermann@stamm-wilbrandt.de wrote:
> 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?
This is the remainder of the Euclidean division of 1+4*x by 3+2*x.
Indeed:
? divrem( 1+4*x , 3+2*x)
%1 = [2,-5]~
Cheers,
Bill.