Debian Codegraph @

doc/matho-primes.1.html

raw
1 <!-- manual page source format generated by PolyglotMan v3.2, -->
2 <!-- available at http://polyglotman.sourceforge.net/ -->
3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
4
5 <html>
6 <head>
7 <meta name="generator" content=
8 "HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
9
10 <title>MATHO-PRIMES(1) manual page</title>
11 </head>
12
13 <body bgcolor='white'>
14 <a href='#toc'>Table of Contents</a>
15
16 <h2><a name='sect0' href='#toc0'>Name</a></h2>matho-primes -
17 generate consecutive prime numbers
18
19 <h2><a name='sect1' href=
20 '#toc1'>Synopsis</a></h2><b>matho-primes</b> [start [stop] or
21 "all"] ["twin"] ["pal" [base]]<br>
22 <b>matho-primes</b> [-htuv] [-c count] [-m number] [-p base]
23 [start [stop]]
24
25 <h2><a name='sect2' href='#toc2'>Description</a></h2>This
26 command-line utility is optionally part of the <a href=
27 'mathomatic.1.html'><b>mathomatic</b>(1)</a> package. It quickly
28 computes any number of consecutive prime numbers using a
29 windowing, memory efficient sieve of Eratosthenes algorithm,
30 dumping them to standard output. They are displayed one prime per
31 line in ascending order, unless the "twin" option is specified,
32 which displays only twin primes, two primes per line.
33
34 <p>Generates up to 18 decimal digit primes, or whatever is the
35 number of digits of precision for a floating point <b>long
36 double</b> in the C compiler used to compile this utility. Note
37 that this utility might be compiled to use only double precision
38 floating point, if long double precision is not fully supported
39 by the C compiler or hardware, allowing at most 15 decimal digit
40 primes in that case.</p>
41
42 <p>Ways to verify that this utility is working are to pipe the
43 output into the Unix "factor" utility, or compare the output with
44 the BSD Games "primes" utility, using the supplied shell script:
45 <b>examples/testprimes.</b></p>
46
47 <p>All numbers displayed by this utility are decimal (base 10)
48 prime numbers. A prime number is an integer that cannot be
49 factored.</p>
50
51 <p>A range may be specified on the command line, otherwise the
52 starting number and the number of primes to output is prompted
53 for. The range is <b>start</b> to <b>stop</b> inclusive, and
54 <b>stop</b> must be greater than or equal to <b>start.</b></p>
55
56 <p>If the <b>-c</b> option is specified, the number of lines of
57 primes displayed is limited to the decimal count that follows
58 this option.</p>
59
60 <p>If the <b>-t</b> or "twin" option is specified on the command
61 line, only <b>twin primes</b> will be displayed. Twin primes are
62 two primes that differ in value by 2. Each twin pair is displayed
63 together on the same line separated by a space character.</p>
64
65 <p>If the <b>-p</b> or "pal" option is specified on the command
66 line, only <b>palindromic primes</b> are displayed. Palindromes
67 are symmetrical, they read exactly the same forward and backward.
68 The palindromic number <b>base</b> may be specified, the default
69 is base 10. The <b>base</b> can be any integer greater than 1.
70 Primes are always displayed in decimal (base 10).</p>
71
72 <p>The version number and short help on the allowed command-line
73 parameters and usage information are displayed when given the
74 <b>-h</b> option.</p>
75
76 <p>With the <b>-u</b> option, all output (standard output and
77 standard error output) is set to be unbuffered, making all output
78 happen immediately, instead of when the output buffer is full or
79 when the program terminates or waits for input.</p>
80
81 <p>The <b>-m</b> option changes the memory size of the prime
82 number sieve window. It is followed by a decimal, floating point
83 number which is a multiplier of the default window size (2
84 megabytes). It is possible that changing the memory size may
85 speed up the total run time a bit; otherwise there is no reason
86 to use this option, and its use is not recommended.</p>
87
88 <p>The <b>-v</b> option simply displays the program name and
89 version number, and then exits successfully.</p>
90
91 <h2><a name='sect3' href='#toc3'>Author</a></h2>George Gesslein
92 II ([email protected]) at "<a href=
93 'http://www.mathomatic.org'>http://www.mathomatic.org</a> ".
94
95 <h2><a name='sect4' href='#toc4'>Reporting Bugs</a></h2>If you
96 find a bug, please report it to the author or at "<a href=
97 'https://launchpad.net/mathomatic'>https://launchpad.net/mathomatic</a>
98 ".
99
100 <h2><a name='sect5' href='#toc5'>See Also</a></h2><a href=
101 'rmath.1.html'><b>rmath</b>(1)</a> , <a href=
102 'mathomatic.1.html'><b>mathomatic</b>(1)</a> , <a href=
103 'primorial.1.html'><b>primorial</b>(1)</a> , <a href=
104 'matho-mult.1.html'><b>matho-mult</b>(1)</a> , <a href=
105 'matho-sum.1.html'><b>matho-sum</b>(1)</a> , <a href=
106 'matho-pascal.1.html'><b>matho-pascal</b>(1)</a> , <a href=
107 'matho-sumsq.1.html'><b>matho-sumsq</b>(1)</a>
108 <hr>
109
110 <p><a name='toc'><b>Table of Contents</b></a></p>
111
112 <ul>
113 <li><a name='toc0' href='#sect0'>Name</a></li>
114
115 <li><a name='toc1' href='#sect1'>Synopsis</a></li>
116
117 <li><a name='toc2' href='#sect2'>Description</a></li>
118
119 <li><a name='toc3' href='#sect3'>Author</a></li>
120
121 <li><a name='toc4' href='#sect4'>Reporting Bugs</a></li>
122
123 <li><a name='toc5' href='#sect5'>See Also</a></li>
124 </ul>
125 </body>
126 </html>