1factor(1) User Commands factor(1)
2
3
4
6 factor - obtain the prime factors of a number
7
9 factor [integer]
10
11
13 factor writes to standard input all prime factors for any positive
14 integer less than or equal to 10^14. The prime factors are written the
15 proper number of times.
16
17
18 If factor is used without an argument, it waits for an integer to be
19 entered. After entry of the integer, it factors it, writes its prime
20 factors the proper number of times, and then waits for another integer.
21 factor exits if a 0 or any non-numeric character is entered.
22
23
24 If factor is invoked with an argument (integer), it writes the integer,
25 factors it and writes all the prime factors as described above, and
26 then exits. If the argument is 0 or non-numeric, factor writes a 0 and
27 then exits.
28
29
30 The maximum time to factor an integer is proportional to sqrt(n), where
31 n is the integer which is entered. factor will take this time when n is
32 prime or the square of a prime.
33
35 integer Any positive integer less than or equal to 10^14.
36
37
39 0 Successful completion.
40
41
42 1 An error occurred.
43
44
46 factor prints the error message Ouch! for input out of range or for
47 garbage input.
48
50 See attributes(5) for descriptions of the following attributes:
51
52
53
54
55 ┌─────────────────────────────┬─────────────────────────────┐
56 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
57 ├─────────────────────────────┼─────────────────────────────┤
58 │Availability │SUNWesu │
59 └─────────────────────────────┴─────────────────────────────┘
60
62 attributes(5)
63
64
65
66SunOS 5.11 31 Jan 1996 factor(1)