01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FACTOR ( l ) FACTOR ( ! )<br />

NAME<br />

factor - factor a number<br />

SYNOPSIS<br />

factor [ number ]<br />

DESCRIPTION<br />

When factor is invoked without an argument, it waits for a<br />

number to be typed in. If you type in a positive number less than<br />

2 56 (about 7.2X 1016 ) it will factor the number and print its prime<br />

factors; each one is printed the proper number of times. Then it<br />

waits for another number. It exits if it encounters a zero or any<br />

non-numeric character.<br />

If factor is invoked with an argument, it factors the number as<br />

above and then exits.<br />

Maximum time to factor is proportional to fo and occurs when n<br />

is prime or the square of a prime. It takes 1 minute to factor a<br />

prime near 1014 on a PDP-11.<br />

DIAGNOSTICS<br />

"Ouch" for input out of range or for garbage input.<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!