Jump to content

Miller–Rabin primality test: Difference between revisions

m
(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[
1,111

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.