Miller–Rabin primality test: Difference between revisions

Content added Content deleted
Line 1,058: Line 1,058:
puts 341531.prime? # => false</lang>
puts 341531.prime? # => false</lang>


=== Deterministic M-R test ===
This is a correct M-R test implementation for using bases > input.
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.
It is a direct translation of the Ruby version for arbitrary sized integers.