[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
System User's Guide: Operating System and Devices

Factoring a Number (factor Command)

You can factor numbers with the factor command. When called without specifying a value for the Number parameter, the factor command waits for you to enter a positive number less than 1E14 (100,000,000,000,000). It then writes the prime factors of that number to standard output. It displays each factor the proper number of times. To exit, enter 0 (zero) or any non-numeric character.

When called with an argument, the factor command determines the prime factors of the Number parameter, writes the results to standard output, and exits.

For example, to calculate the prime factors of 123, enter:

factor 123

The following is displayed:

123
3
41

See the factor command in the AIX Version 4.3 Commands Reference for the exact syntax.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]