mirror of
https://github.com/mfillpot/mathomatic.git
synced 2026-01-09 04:59:37 +00:00
127 lines
5.1 KiB
HTML
127 lines
5.1 KiB
HTML
<!-- manual page source format generated by PolyglotMan v3.2, -->
|
|
<!-- available at http://polyglotman.sourceforge.net/ -->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content=
|
|
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
|
|
|
|
<title>MATHO-PRIMES(1) manual page</title>
|
|
</head>
|
|
|
|
<body bgcolor='white'>
|
|
<a href='#toc'>Table of Contents</a>
|
|
|
|
<h2><a name='sect0' href='#toc0'>Name</a></h2>matho-primes -
|
|
generate consecutive prime numbers
|
|
|
|
<h2><a name='sect1' href=
|
|
'#toc1'>Synopsis</a></h2><b>matho-primes</b> [start [stop] or
|
|
"all"] ["twin"] ["pal" [base]]<br>
|
|
<b>matho-primes</b> [-htuv] [-c count] [-m number] [-p base]
|
|
[start [stop]]
|
|
|
|
<h2><a name='sect2' href='#toc2'>Description</a></h2>This
|
|
command-line utility is optionally part of the <a href=
|
|
'mathomatic.1.html'><b>mathomatic</b>(1)</a> package. It quickly
|
|
computes any number of consecutive prime numbers using a
|
|
windowing, memory efficient sieve of Eratosthenes algorithm,
|
|
dumping them to standard output. They are displayed one prime per
|
|
line in ascending order, unless the "twin" option is specified,
|
|
which displays only twin primes, two primes per line.
|
|
|
|
<p>Generates up to 18 decimal digit primes, or whatever is the
|
|
number of digits of precision for a floating point <b>long
|
|
double</b> in the C compiler used to compile this utility. Note
|
|
that this utility might be compiled to use only double precision
|
|
floating point, if long double precision is not fully supported
|
|
by the C compiler or hardware, allowing at most 15 decimal digit
|
|
primes in that case.</p>
|
|
|
|
<p>Ways to verify that this utility is working are to pipe the
|
|
output into the Unix "factor" utility, or compare the output with
|
|
the BSD Games "primes" utility, using the supplied shell script:
|
|
<b>examples/testprimes.</b></p>
|
|
|
|
<p>All numbers displayed by this utility are decimal (base 10)
|
|
prime numbers. A prime number is an integer that cannot be
|
|
factored.</p>
|
|
|
|
<p>A range may be specified on the command line, otherwise the
|
|
starting number and the number of primes to output is prompted
|
|
for. The range is <b>start</b> to <b>stop</b> inclusive, and
|
|
<b>stop</b> must be greater than or equal to <b>start.</b></p>
|
|
|
|
<p>If the <b>-c</b> option is specified, the number of lines of
|
|
primes displayed is limited to the decimal count that follows
|
|
this option.</p>
|
|
|
|
<p>If the <b>-t</b> or "twin" option is specified on the command
|
|
line, only <b>twin primes</b> will be displayed. Twin primes are
|
|
two primes that differ in value by 2. Each twin pair is displayed
|
|
together on the same line separated by a space character.</p>
|
|
|
|
<p>If the <b>-p</b> or "pal" option is specified on the command
|
|
line, only <b>palindromic primes</b> are displayed. Palindromes
|
|
are symmetrical, they read exactly the same forward and backward.
|
|
The palindromic number <b>base</b> may be specified, the default
|
|
is base 10. The <b>base</b> can be any integer greater than 1.
|
|
Primes are always displayed in decimal (base 10).</p>
|
|
|
|
<p>The version number and short help on the allowed command-line
|
|
parameters and usage information are displayed when given the
|
|
<b>-h</b> option.</p>
|
|
|
|
<p>With the <b>-u</b> option, all output (standard output and
|
|
standard error output) is set to be unbuffered, making all output
|
|
happen immediately, instead of when the output buffer is full or
|
|
when the program terminates or waits for input.</p>
|
|
|
|
<p>The <b>-m</b> option changes the memory size of the prime
|
|
number sieve window. It is followed by a decimal, floating point
|
|
number which is a multiplier of the default window size (2
|
|
megabytes). It is possible that changing the memory size may
|
|
speed up the total run time a bit; otherwise there is no reason
|
|
to use this option, and its use is not recommended.</p>
|
|
|
|
<p>The <b>-v</b> option simply displays the program name and
|
|
version number, and then exits successfully.</p>
|
|
|
|
<h2><a name='sect3' href='#toc3'>Author</a></h2>George Gesslein
|
|
II (gesslein@mathomatic.org) at "<a href=
|
|
'http://www.mathomatic.org'>http://www.mathomatic.org</a> ".
|
|
|
|
<h2><a name='sect4' href='#toc4'>Reporting Bugs</a></h2>If you
|
|
find a bug, please report it to the author or at "<a href=
|
|
'https://launchpad.net/mathomatic'>https://launchpad.net/mathomatic</a>
|
|
".
|
|
|
|
<h2><a name='sect5' href='#toc5'>See Also</a></h2><a href=
|
|
'rmath.1.html'><b>rmath</b>(1)</a> , <a href=
|
|
'mathomatic.1.html'><b>mathomatic</b>(1)</a> , <a href=
|
|
'primorial.1.html'><b>primorial</b>(1)</a> , <a href=
|
|
'matho-mult.1.html'><b>matho-mult</b>(1)</a> , <a href=
|
|
'matho-sum.1.html'><b>matho-sum</b>(1)</a> , <a href=
|
|
'matho-pascal.1.html'><b>matho-pascal</b>(1)</a> , <a href=
|
|
'matho-sumsq.1.html'><b>matho-sumsq</b>(1)</a>
|
|
<hr>
|
|
|
|
<p><a name='toc'><b>Table of Contents</b></a></p>
|
|
|
|
<ul>
|
|
<li><a name='toc0' href='#sect0'>Name</a></li>
|
|
|
|
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
|
|
|
|
<li><a name='toc2' href='#sect2'>Description</a></li>
|
|
|
|
<li><a name='toc3' href='#sect3'>Author</a></li>
|
|
|
|
<li><a name='toc4' href='#sect4'>Reporting Bugs</a></li>
|
|
|
|
<li><a name='toc5' href='#sect5'>See Also</a></li>
|
|
</ul>
|
|
</body>
|
|
</html>
|