Skip to content

Commit

Permalink
Remove sieving example
Browse files Browse the repository at this point in the history
  • Loading branch information
JSorngard committed Jul 12, 2024
1 parent a5ea35a commit 7ebeeac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ const CHECK: bool = is_prime(18_446_744_073_709_551_557);
assert!(CHECK);
```

## Example: sieving

Sieve a range of numbers for their prime status with `sieve`:
```rust
use const_primes::sieve;

const PRIME_STATUS: [bool; 10] = sieve();

// 0 1 2 3 4 5 6 7 8 9
assert_eq!(PRIME_STATUS, [false, false, true, true, false, true, false, true, false, false]);
```

## Example: generate the three primes after 5000000031

The crate also provides prime generation and sieving functions that can be used to work with ranges that don't start at zero, e.g. `primes_geq` and `sieve_lt`. These functions can use large sieves to compute large primes, but don't need to return the entire sieve, just the requested numbers.
Expand Down
12 changes: 0 additions & 12 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@
//! assert!(CHECK);
//! ```
//!
//! # Example: sieving
//!
//! Sieve a range of numbers for their prime status with [`sieve`](crate::sieve()):
//! ```
//! use const_primes::sieve;
//!
//! const PRIME_STATUS: [bool; 10] = sieve();
//!
//! // 0 1 2 3 4 5 6 7 8 9
//! assert_eq!(PRIME_STATUS, [false, false, true, true, false, true, false, true, false, false]);
//! ```
//!
//! # Example: generate the three primes after 5000000031
//!
//! The crate also provides prime generation and sieving functions that can be used to work with ranges that don't start at zero, e.g. [`primes_geq`] and [`sieve_lt`].
Expand Down

0 comments on commit 7ebeeac

Please sign in to comment.