Miller–Rabin primality test: Difference between revisions
Content added Content deleted
(Optimisation of existing solution) |
|||
Line 3,213: | Line 3,213: | ||
</lang> |
</lang> |
||
=={{header|Mathematica}}== |
=={{header|Mathematica}}/{{header|Wolfram Language}}== |
||
<lang Mathematica>MillerRabin[n_,k_]:=Module[{d=n-1,s=0,test=True},While[Mod[d,2]==0 ,d/=2 ;s++] |
<lang Mathematica>MillerRabin[n_,k_]:=Module[{d=n-1,s=0,test=True},While[Mod[d,2]==0 ,d/=2 ;s++] |
||
Do[ |
Do[ |