Bill Allombert on Sun, 03 Nov 2024 21:39:57 +0100


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

Re: Is there a simpler way to get all 8 gaussian integers with same norml2() ?


On Sun, Nov 03, 2024 at 04:00:16PM +0100, hermann@stamm-wilbrandt.de wrote:
> 
> ? id(c)=c;
> ? neg(x)=-x;
> ? flip(c)=I*conj(c);
> ? c=7+4*I;vecsort([f(g(h(c)))|f<-[id,conj];g<-[id,neg];h<-[id,flip]])
> [-7 - 4*I, -7 + 4*I, -4 - 7*I, -4 + 7*I, 4 - 7*I, 4 + 7*I, 7 - 4*I, 7 + 4*I]

I suggest

[w*z | w<-powers(I,3); z<-[c,conj(c)]]

Cheers,
Bill.