changeset 31046:6d9ff512a08a

maint: merge stable to default
author Rik <rik@octave.org>
date Mon, 30 May 2022 18:24:27 -0700
parents faca2c7d5345 (current diff) 690df1852f27 (diff)
children c55c6b91447f
files
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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