File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,10 @@ pub const fn primes_lt<const N: usize, const MEM: usize>(
236236 Ok ( primes)
237237}
238238
239- /// Call [`primes_geq`] or [`primes_lt`], and automatically compute the memory requirement of the sieve.
239+ /// Generate arrays of large prime numbers without having to store all primes
240+ /// from 2 and up in the result, and thus potentially the binary.
241+ ///
242+ /// Calls [`primes_geq`] or [`primes_lt`], and automatically computes the memory requirement of the sieve.
240243///
241244/// Compute `N` primes larger than or equal to some limit as `primes_segment!(N; >= LIMIT)`,
242245/// and `N` primes less than some limit as `primes_segment!(N; < LIMIT)`.
@@ -251,8 +254,10 @@ pub const fn primes_lt<const N: usize, const MEM: usize>(
251254/// # use const_primes::{primes_segment, GenerationError};
252255/// const N: usize = 3;
253256/// const LIMIT: u64 = 5_000_000_031;
257+ ///
254258/// const PRIMES_GEQ: Result<[u64; N], GenerationError> = primes_segment!(N; >= LIMIT);
255259/// const PRIMES_LT: Result<[u64; N], GenerationError> = primes_segment!(N; < LIMIT);
260+ ///
256261/// // Can also be used at runtime:
257262/// let primes_geq = primes_segment!(N; >= LIMIT);
258263///
Original file line number Diff line number Diff line change @@ -391,7 +391,10 @@ pub const fn sieve_geq<const N: usize, const MEM: usize>(
391391 Ok ( ans)
392392}
393393
394- /// Call [`sieve_geq`] or [`sieve_lt`], and automatically compute the memory requirement of the sieve.
394+ /// Generate arrays of the prime status of large numbers without having to store the prime status
395+ /// of every single integer smaller than the target in the result, and thus potentially the binary.
396+ ///
397+ /// Calls [`sieve_geq`] or [`sieve_lt`], and automatically computes the memory requirement of the sieve.
395398///
396399/// Sieve the `N` smallest numbers larger than or equal to some limit as `sieve_segment!(N; >= LIMIT)`,
397400/// and the `N` largest numbers smaller than some limit as `sieve_segment!(N; < LIMIT)`.
You can’t perform that action at this time.
0 commit comments