Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low hanging performance fixes and some comment cleanup #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ travis-ci = { repository = "AtropineTears/num-primes", branch = "master" }
[dependencies]
# num
num = { version = "0.4.0", default-features = false }
num-traits = "0.2.11"
num-bigint = { version = "0.2.6", features = ["rand"] }
num-traits = "0.2.14"
num-bigint = { version = "0.4.3", features = ["rand"] }
# random
rand = "0.5.6"
rand = "0.8.4"

# Logging
log = "0.4.14"
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ It takes full advantage of the [num](https://crates.io/crates/num) crate on **st
* Read the [License](#license)
* Read the [Contribution](#contribution)

## Notice

Please note there is a critical bug in this program that I cannot seem to fix where it marks some prime numbers as not prime. It is in the miller-rabin implementation and I cannot seem to fix it. If anyone is up to it, feel free to look through the issues tab for information about the bug and submit a PR if you find a fix.

## Usage

Add this to your `Cargo.toml`:
Expand All @@ -24,10 +20,6 @@ Add this to your `Cargo.toml`:
num-primes = "0.2.0"
```

## Warning

There is currently a major bug in `is_prime()` and `is_composite()` that makes some values return wrong. For example, a prime can sometimes be marked as composite unless it was generated as they use the same tests to test for primality.

## How To Use

There are three main structs that are included in this library
Expand Down Expand Up @@ -98,10 +90,6 @@ fn main(){
}
```

## Verification

WARNING: There is currently a bug that makes verification of certain prime numbers fail. Be careful when using this feature.

### Verify Composite Number

This function will verify whether a `BigUint` type is a **composite** by returning a boolean value.
Expand Down
Loading