blob: 597484b40b0a0116edebd52cae1c87ae98ab09f7 [file] [log] [blame]
rsccfa37a72004-04-10 18:53:55 +00001.TH FACTOR 1
2.CT 1 numbers
3.SH NAME
4factor, primes \- factor a number, generate large primes
5.SH SYNOPSIS
6.B factor
7[
8.I number
9]
10.PP
11.B primes
12[
13.I start
14[
15.I finish
16]
17]
18.SH DESCRIPTION
19.I Factor
20prints
21.I number
22and its prime factors,
23each repeated the proper number of times.
24The number must be positive and less than
25.if n 2**54
26.if t 2\u\s754\s0\d
27(about
28.if n 1.8e16)
29.if t 1.8\(mu10\u\s716\s0\d\|).
30.PP
31If no
32.I number
33is given,
34.I factor
35reads a stream of numbers from the standard input and factors them.
36It exits on any input not a positive integer.
37Maximum running time is proportional to
38.if n sqrt(n).
39.if t .I \(sr\o'n\(rn'\f1.
40.PP
41.PP
42.I Primes
43prints the prime numbers ranging from
44.I start
45to
46.IR finish ,
47where
48.I start
49and
50.I finish
51are positive numbers less than
52.if n 2**56.
53.if t 2\u\s756\s0\d.
54If
55.I finish
56is missing,
57.I primes
58prints without end;
59if
60.I start
61is missing, it reads the starting number from the
62standard input.
63.SH SOURCE
rscc3674de2005-01-11 17:37:33 +000064.B \*9/src/cmd/factor.c
rsccfa37a72004-04-10 18:53:55 +000065.br
rscc3674de2005-01-11 17:37:33 +000066.B \*9/src/cmd/primes.c