Mercurial > octave
diff scripts/specfun/primes.m @ 31045:690df1852f27 stable
primes.m: Mark variables in docstring with @var{} macro.
* primes.m: Mark variables in docstring with @var{} macro.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 30 May 2022 18:24:00 -0700 |
parents | 9a722a4316b6 |
children | 597f3ee61a48 |
line wrap: on
line diff
--- a/scripts/specfun/primes.m Mon May 30 12:33:05 2022 -0400 +++ b/scripts/specfun/primes.m Mon May 30 18:24:00 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