factor.6 (686fb94a00297bf9ff49d93b948925552a2ce8e0) | factor.6 (526473251ee3dd5ab71975d6b9780e00a4660b64) |
---|---|
1.\" Copyright (c) 1989, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Landon Curt Noll. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 22 unchanged lines hidden (view full) --- 31.\" @(#)factor.6 8.1 (Berkeley) 5/31/93 32.\" 33.\" $FreeBSD$ 34.\" 35.\" By: Landon Curt Noll chongo@toad.com, ...!{sun,tolsoft}!hoptoad!chongo 36.\" 37.\" chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\ 38.\" | 1.\" Copyright (c) 1989, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Landon Curt Noll. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 22 unchanged lines hidden (view full) --- 31.\" @(#)factor.6 8.1 (Berkeley) 5/31/93 32.\" 33.\" $FreeBSD$ 34.\" 35.\" By: Landon Curt Noll chongo@toad.com, ...!{sun,tolsoft}!hoptoad!chongo 36.\" 37.\" chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\ 38.\" |
39.Dd October 10, 2002 | 39.Dd January 12, 2020 |
40.Dt FACTOR 6 41.Os 42.Sh NAME 43.Nm factor , primes 44.Nd factor a number, generate primes 45.Sh SYNOPSIS 46.Nm 47.Op Fl h --- 14 unchanged lines hidden (view full) --- 62When 63.Nm 64is invoked with one or more arguments, each argument will be factored. 65.Pp 66When 67.Nm 68is invoked with no arguments, 69.Nm | 40.Dt FACTOR 6 41.Os 42.Sh NAME 43.Nm factor , primes 44.Nd factor a number, generate primes 45.Sh SYNOPSIS 46.Nm 47.Op Fl h --- 14 unchanged lines hidden (view full) --- 62When 63.Nm 64is invoked with one or more arguments, each argument will be factored. 65.Pp 66When 67.Nm 68is invoked with no arguments, 69.Nm |
70reads numbers, one per line, from standard input, until end of file or error. | 70reads numbers, one per line, from standard input until end of file or 0 71is entered or an error occurs. |
71Leading white-space and empty lines are ignored. | 72Leading white-space and empty lines are ignored. |
73.Pp |
|
72Numbers may be preceded by a single 73.Ql + . | 74Numbers may be preceded by a single 75.Ql + . |
76Numbers can be either decimal or hexadecimal strings where the longest 77leading substring is used. |
|
74Numbers are terminated by a non-digit character (such as a newline). | 78Numbers are terminated by a non-digit character (such as a newline). |
79If the string contains only decimal digits, it is treated as a 80decimal representation for a number. 81A hexadecimal string can contain an optional 82.Em 0x 83or 84.Em 0X 85prefix. |
|
75After a number is read, it is factored. 76.Pp 77The 78.Nm primes 79utility prints primes in ascending order, one per line, starting at or above 80.Ar start 81and continuing until, but not including 82.Ar stop . 83The 84.Ar start 85value must be at least 0 and not greater than 86.Ar stop . 87The 88.Ar stop 89value must not be greater than the maximum. 90The default and maximum value of 91.Ar stop | 86After a number is read, it is factored. 87.Pp 88The 89.Nm primes 90utility prints primes in ascending order, one per line, starting at or above 91.Ar start 92and continuing until, but not including 93.Ar stop . 94The 95.Ar start 96value must be at least 0 and not greater than 97.Ar stop . 98The 99.Ar stop 100value must not be greater than the maximum. 101The default and maximum value of 102.Ar stop |
92is 3825123056546413050. | 103is 18446744073709551615. |
93.Pp 94When the 95.Nm primes 96utility is invoked with no arguments, 97.Ar start 98is read from standard input and 99.Ar stop 100is taken to be the maximum. --- 21 unchanged lines hidden --- | 104.Pp 105When the 106.Nm primes 107utility is invoked with no arguments, 108.Ar start 109is read from standard input and 110.Ar stop 111is taken to be the maximum. --- 21 unchanged lines hidden --- |