Miller–Rabin primality test: Difference between revisions

Content added Content deleted
(→‎{{header|Python}}: Add section "Proved correct up to large N")
Line 1,956: Line 1,956:
return not any(_try_composite(a, d, n, s)
return not any(_try_composite(a, d, n, s)
for a in _known_primes[:_precision_for_huge_n])</lang>
for a in _known_primes[:_precision_for_huge_n])</lang>

;Testing:
Using the test values from the Ada example:
<pre>>>> is_prime(4547337172376300111955330758342147474062293202868155909489)
True
>>> is_prime(4547337172376300111955330758342147474062293202868155909393)
False
>>> </pre>


=={{header|Racket}}==
=={{header|Racket}}==