Skip to content
Miller-Rabin algorithm for prime checking
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
spec
src
.gitignore
.travis.yml
LICENSE
README.md
shard.yml

README.md

miller_rabin

Implements Miller-Rabin algorithm to check if a number is prime

Installation

Add this to your application's shard.yml:

dependencies:
  miller_rabin:
    github: kuende/miller_rabin

Usage

require "miller_rabin"

MillerRabin.probably_prime(10459103, 100)
MillerRabin.probably_prime(5915587219_u64, 100)

Contributing

  1. Fork it ( https://github.com/kuende/miller_rabin/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
You can’t perform that action at this time.