Eisenstein primes: Difference between revisions
Content added Content deleted
m (The norm should be the square of the modulus.) |
m (→{{header|J}}: cleaner code) |
||
Line 29: | Line 29: | ||
Implementation: |
Implementation: |
||
<syntaxhighlight lang=J>eisensteinprimes=: {{ |
<syntaxhighlight lang=J>eisensteinprimes=: {{ |
||
rY= |
rY=. >.1.5%:y |
||
p1=. ,(w^i.3)*/(#~ 2= 3|]) p:i.rY |
|||
'a b'=. |:(2#rY)#:I.,1 p: {{(x*x)+(y*y)-x*y}}"0/~i.rY |
|||
⚫ | |||
'a b'=: |:(2#rY)#:I.,1 p: {{(x*x)+(y*y)-x*y}}"0/~i.rY |
|||
⚫ | |||
}}</syntaxhighlight> |
}}</syntaxhighlight> |
||