factor(1) DG/UX 5.4R3.00 factor(1)
NAME
factor - factor a number
SYNOPSIS
factor [ number ]
where:
number An integer from 1 to 100,000,000,000,000
DESCRIPTION
When factor is invoked without an argument, it waits for a number to
be typed in. If you type in a positive number less than 1014 it will
factor the number and print its prime factors; each one is printed
the proper number of times. Then it waits for another number. It
exits if it encounters a zero or any non-numeric character.
If factor is invoked with an argument, it factors the number as above
and then exits.
Maximum time to factor is proportional to sqrt(n) and occurs when n
is prime or the square of a prime.
EXAMPLES
$ factor 12
12
2
2
3
The above command lists the prime factors for the number 12.
DIAGNOSTICS
The message "Ouch!" is displayed for input out of range or for
garbage input.
SEE ALSO
expr(1).
Licensed material--property of copyright holder(s) 1