Anonymous user
Miller–Rabin primality test: Difference between revisions
→Standard non-deterministic M-R test
Line 1,058:
puts 341531.prime? # => false</lang>
=== Deterministic M-R test ===
This is a correct M-R test implementation for using bases > input.
It is a direct translation of the Ruby version for arbitrary sized integers.
|