alternative factor(1) - MANUAL

George Sicherman colonel at sunybcs.UUCP
Fri Dec 9 06:40:12 AEST 1983


.TH FACTOR 1 
.UC 4
.SH NAME
factor, primes \- factor a number, generate large primes
.SH SYNOPSIS
.B factor
[
.B \-p
] [ number ... ]
.PP
.B primes
[ number ... ]
.br
.SH DESCRIPTION
When
.I factor
is invoked without an argument,
it waits for a number to be typed in.
If you type a positive number less than
2\(ua56
(about 7.2E16),
it
prints the number's prime factors,
each the proper number of times.
Then it waits for another number.
.PP
If
.I factor
is invoked with arguments,
it factors them as above and then exits.
.PP
Maximum time to factor
is proportional to the square root of
.I n
and occurs when
.I n
is prime or the square of a prime.
.PP
When
.I primes
is invoked,
it waits for a number to be typed in.
If you type a positive number less than
2\(ua56,
it prints all primes greater than or equal
to the number.
.PP
If
.I primes
is invoked with an argument,
it uses the argument as the number.
With several arguments,
.I primes
prints only the least prime
greater than or equal to each,
and then exits.
.PP
With the
.B -p
option,
.I factor
is equivalent to
.I primes.
.PP
.SH BUGS
This program is a home-brewed imitation
of the corresponding program in Unix Version 7.
It is warranted neither for speed nor correctness.
.SH AUTHOR
Col. Sicherman



More information about the Comp.sources.unix mailing list