Lucas-Lehmer test: Difference between revisions

Content deleted Content added
PatGarrett (talk | contribs)
Line 37:
SR R9,R2 IEXP-2 limit
LOOPI BXH R5,R8,ENDLOOPI do i=1 to iexp-2
* ---- compute s=(s*s-2) MOD n -- use local 64 bit arith (M,D)
SR R14,R14 R14=0
LR R15,R3 R15=S
MR R14,R3 R{14-15}=S*S
SR R15,R2 R14R15=R15-2=S*S-2 still keeps the overflow
DR R14,R10 R15R10=DIVN
LR R3,R14 R14=MOD
B LOOPI
Line 64:
BR R14
* ---- DATA
IEXPMAX DC H'3116'
I DS H
IEXP DS H
Line 73:
C DS CL16 character
WTOMSG CNOP 0,4
DC H'80' length of WTO buffer,XL2'0000'
DC H'0' must be binary zeroes
WTOBUF DC 80C' '
LTORG
Line 84 ⟶ 83:
M005
M007
M013</pre>
M017
M019
M031</pre>
 
=={{header|Ada}}==