aboutsummaryrefslogtreecommitdiff
path: root/man/man1/factor.1
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-10 18:53:55 +0000
committerrsc <devnull@localhost>2004-04-10 18:53:55 +0000
commitcfa37a7b1131abbab2e7d339b451f5f0e3198cc8 (patch)
treea7fe52416e9d27efe2af2d54910112674c0fd7c6 /man/man1/factor.1
parent08df2a433e69c94f9db002c83380cb2b693fee60 (diff)
downloadplan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.tar.gz
plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.tar.bz2
plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.zip
Lots of man pages.
Diffstat (limited to 'man/man1/factor.1')
-rw-r--r--man/man1/factor.166
1 files changed, 66 insertions, 0 deletions
diff --git a/man/man1/factor.1 b/man/man1/factor.1
new file mode 100644
index 00000000..2d9b5a09
--- /dev/null
+++ b/man/man1/factor.1
@@ -0,0 +1,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 /sys/src/cmd/factor.c
+.br
+.B /sys/src/cmd/primes.c