Miller–Rabin primality test: Difference between revisions

Line 6,150:
</syntaxhighlight>
 
As in the previous version, k = 3 was hard coded and seems good enough for this test. A higher k gives more confidence on the probable primes, but also a longer running time.
This will produce output (Windows 11, Intel i7, 4.5Ghz, 16G):
 
This version will produce output (Windows 11, Intel i7, 4.5Ghz, 16G):
 
<pre>
20

edits