Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
callum-fortune committed Apr 26, 2024
1 parent 60b2a4a commit d2e6649
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ A complete Rust implementation of the Miller Rabin primality test algorithm. Vie
cargo build
cargo run
```
- If you wish to use this as a library you can import and use it as follows:

```
use rust_miller_rabin::miller_rabin
fn is_prime(number: BigInt) -> bool {
println!("Checking prime");
return miller_rabin(&number);
}
```

- I have included tests for the project which will test small primes, large primes, small non-primes and large non-primes. Run these with:

```
Expand Down

0 comments on commit d2e6649

Please sign in to comment.