Anonymous user
Miller–Rabin primality test: Difference between revisions
→This is a correct M-R test implementation for using bases > input.
Line 1,058:
puts 341531.prime? # => false</lang>
<lang ruby># For crystal >= 0.31.x, compile without overflow check, as either▼
▲# For crystal >= 0.31.x, compile without overflow check, as either
# crystal build miller-rabin.cr -Ddisable_overflow --release
# crystal build -Ddisable_overflow miller-rabin.cr --release
|