Miller–Rabin primality test: Difference between revisions

(→‎{{header|Python}}: Add section "Proved correct up to large N")
Line 1,956:
return not any(_try_composite(a, d, n, s)
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}}==
Anonymous user