# HG changeset patch # User Rik # Date 1653960267 25200 # Node ID 6d9ff512a08af3be0c65b2621ec708dc72628cb4 # Parent faca2c7d5345f828347f10f831b266e0a2733825# Parent 690df1852f27ea3656af0b6e872acf20bb885d87 maint: merge stable to default diff -r faca2c7d5345 -r 6d9ff512a08a scripts/specfun/primes.m --- a/scripts/specfun/primes.m Mon May 30 12:33:34 2022 -0400 +++ b/scripts/specfun/primes.m Mon May 30 18:24:27 2022 -0700 @@ -30,11 +30,12 @@ ## The output data class (double, single, uint32, etc.@:) is the same as the ## input class of @var{n}. The algorithm used is the Sieve of Eratosthenes. ## -## Note: For a specific number @var{n} of primes, call @code{list_primes (N)}, -## or @code{primes (N*log (K*N))(1:N)} where @var{K} is about 5 or 6. -## This works because the distance from one prime to the next is proportional -## to the logarithm of the prime, on average. On integrating, there are about -## @var{n} primes less than @code{N * log(5*N)}. +## Note: For a specific number @var{n} of primes, call +## @code{list_primes (@var{n})}. Alternatively, call +## @code{primes (@var{n}*log (@var{k}*@var{n}))(1:@var{n})} where @var{k} is +## about 5 or 6. This works because the distance from one prime to the next is +## proportional to the logarithm of the prime, on average. On integrating, +## there are about @var{n} primes less than @code{@var{n} * log (5*@var{n})}. ## ## @seealso{list_primes, isprime} ## @end deftypefn