Talk:Miller–Rabin primality test: Difference between revisions

(Pseudocode)
 
(One intermediate revision by one other user not shown)
Line 65:
==Pseudocode in task description==
The pseudocode includes the line "for r = 1 .. s − 1". Where is r used?--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 17:26, 20 August 2019 (UTC)
: It's not, so I have updated the pseudocode replacing the '''for r''' loop with a '''repeat s-1 times''' loop. -- [[User:Markjreed|Markjreed]] ([[User talk:Markjreed|talk]]) 17:05, 28 November 2021 (UTC)
 
== Pari/GP ==
 
An extension of Pari code thru consecutive bases, where sprp is per the article. Allows confirmation of 341550071728321 passing bases 2,3,5,7,11,13,17 as well as 3215031751 with 2,3,5,7 (OEIS A074773) eg MR(3215031751,2,7).
::''MR(n,blo,bhi)={prodd=1;ctr=0;
::forprime(b=blo,bhi,ctr+=1;
::prodd= prodd* sprp(n,b); \\SO, any 0 will clear it ...
::if(prodd==0,break));
::print(prodd, " ",ctr);}''
<br>--[[User:Billymacc|Billymacc]] ([[User talk:Billymacc|talk]]) 16:53, 13 July 2021 (UTC)
1,479

edits