Miller–Rabin primality test: Difference between revisions
m
→{{header|Mathematica}}
(Optimisation of existing solution) |
|||
Line 3,213:
</lang>
=={{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++]
Do[
|