Miller–Rabin primality test: Difference between revisions

Content added Content deleted
Line 1,092: Line 1,092:
struct Int; include Primes::MillerRabin end
struct Int; include Primes::MillerRabin end


def tm; t = Time.monotonic; yield; Time.monotonic - t end
def tm; t = Time.monotonic; yield; (Time.monotonic - t).total_seconds.round(6) end


# 10 digit prime
# 10 digit prime