|
|
1.1 ! root 1: .\" Copyright (c) 1989 The Regents of the University of California. ! 2: .\" 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 are permitted provided ! 8: .\" that: (1) source distributions retain this entire copyright notice and ! 9: .\" comment, and (2) distributions including binaries display the following ! 10: .\" acknowledgement: ``This product includes software developed by the ! 11: .\" University of California, Berkeley and its contributors'' in the ! 12: .\" documentation or other materials provided with the distribution and in ! 13: .\" all advertising materials mentioning features or use of this software. ! 14: .\" Neither the name of the University nor the names of its contributors may ! 15: .\" be used to endorse or promote products derived from this software without ! 16: .\" specific prior written permission. ! 17: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 18: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 19: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 20: .\" ! 21: .\" @(#)factor.6 5.3 (Berkeley) 6/23/90 ! 22: .\" ! 23: .\" ! 24: .\" By: Landon Curt Noll [email protected], ...!{sun,tolsoft}!hoptoad!chongo ! 25: .\" ! 26: .\" chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\ ! 27: .\" ! 28: .TH FACTOR 6 "June 23, 1990" ! 29: .UC 7 ! 30: .SH NAME ! 31: factor, primes \- factor a number, generate primes ! 32: .SH SYNOPSIS ! 33: .B factor ! 34: [ number ] ... ! 35: .PP ! 36: .B primes ! 37: [ start [ stop ]] ! 38: .SH DESCRIPTION ! 39: The ! 40: .I factor ! 41: utility will factor integers between -2147483648 and 2147483647 inclusive. ! 42: When a number is factored, it is printed, followed by a ``:'', ! 43: and the list of factors on a single line. ! 44: Factors are listed in ascending order, and are preceded by a space. ! 45: If a factor divides a value more than once, it will be printed ! 46: more than once. ! 47: .PP ! 48: When ! 49: .I factor ! 50: is invoked with one or more arguments, ! 51: each argument will be factored. ! 52: .PP ! 53: When ! 54: .I factor ! 55: is invoked with no arguments, ! 56: .I factor ! 57: reads numbers, one per line, from standard input, until end of file or error. ! 58: Leading white-space and empty lines are ignored. ! 59: Numbers may be preceded by a single - or +. ! 60: Numbers are terminated by a non-digit character (such as a newline). ! 61: After a number is read, it is factored. ! 62: Input lines must not be longer than 255 characters. ! 63: .PP ! 64: The ! 65: .I primes ! 66: utility prints primes in ascending order, one per line, starting at or above ! 67: .B start ! 68: and continuing until, but not including ! 69: .B stop. ! 70: The ! 71: .B start ! 72: value must be at least 0 and not greater than ! 73: .B stop.\& ! 74: The ! 75: .B stop ! 76: value must not be greater than 4294967295. ! 77: The default value of ! 78: .B stop ! 79: is 4294967295. ! 80: .PP ! 81: When the ! 82: .I primes ! 83: utility is invoked with no arguments, ! 84: .B start ! 85: is read from standard input. ! 86: .B Stop ! 87: is taken to be 4294967295. ! 88: The ! 89: .B start ! 90: value may be preceded by a single +. ! 91: The ! 92: .B start ! 93: value is terminated by a non-digit character (such as a newline). ! 94: The input line must not be longer than 255 characters. ! 95: .SH DIAGNOSTICS ! 96: Out of range or invalid input results in `ouch' being ! 97: written to standard error. ! 98: .SH BUGS ! 99: .I Factor ! 100: cannot handle the ``10 most wanted'' factor list, ! 101: .I primes ! 102: won't get you a world record.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.