xref: /plan9/sys/man/1/factor (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
FACTOR 1
.CT 1 numbers
NAME
factor, primes - factor a number, generate large primes
SYNOPSIS
factor [ number ]

primes [ start [ finish ] ]

DESCRIPTION
Factor prints number and its prime factors, each repeated the proper number of times. The number must be positive and less than (about

If no number is given, 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

Lfactor reads one number from the standard input and factors it. Worst-case running time is proportional to it beats factor for hard 12-digit problems and is workable to around ..

Primes prints the prime numbers ranging from start to finish , where start and finish are positive numbers less than If finish is missing, primes prints without end; if start is missing, it reads the starting number from the standard input.

SOURCE
/sys/src/cmd/factor.c

/sys/src/cmd/primes.c