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