Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kuende/miller_rabin
Miller-Rabin algorithm for prime checking
https://github.com/kuende/miller_rabin
Last synced: 30 days ago
JSON representation
Miller-Rabin algorithm for prime checking
- Host: GitHub
- URL: https://github.com/kuende/miller_rabin
- Owner: kuende
- License: other
- Created: 2016-04-29T09:35:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T07:42:53.000Z (almost 7 years ago)
- Last Synced: 2024-08-03T17:12:31.442Z (4 months ago)
- Language: Crystal
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - miller_rabin - Implements [Miller-Rabin](https://en.wikibooks.org/wiki/Algorithm_Implementation/Mathematics/Primality_Testing) algorithm to check if a number is prime (Algorithms and Data structures)
README
# miller_rabin
Implements [Miller-Rabin](https://en.wikibooks.org/wiki/Algorithm_Implementation/Mathematics/Primality_Testing) algorithm to check if a number is prime
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
miller_rabin:
github: kuende/miller_rabin
```## Usage
```crystal
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