FACTOR(6) NetBSD Games Manual FACTOR(6)NAME

factor-- factor a numberSYNOPSIS

factor[-hx] [number ...]DESCRIPTION

Thefactorutility factors integers larger than 0. When a number is fac- tored, it is printed, followed by a ``:'', and the list of (prime) fac- tors on a single line. Factors are listed in ascending order, and are preceded by a space. By default, if a factor divides a value more than once, it will be printed more than once. Whenfactoris invoked with one or morenumberarguments, each argument will be factored. Whenfactoris invoked with nonumberarguments,factorreads numbers, one per line, from standard input, until end of file or error. Leading white-space and empty lines are ignored. Numbers may be preceded by a single +. Numbers that start with 0x are interpreted as hexadecimal. A 0 input exits the program. Negative numbers are not allowed. Numbers are terminated by a non-digit character (such as a newline). After a number is read, it is factored. Input lines must not be longer than LINE_MAX - 1 (currently 2047) characters. By default,factoris compiled against the OpenSSL bignum implementation openssl_bn(3), which lets it handle arbitrarily large values. (Note however that very large values can take a very long time to factor.) Iffactoris compiled without OpenSSL it is limited to the maximum value ofunsigned long. The following option is available:-hIf the-hflag is specified, factors will be printed in "human- readable" format. If a factor x divides a value n (>1) times, it will appear as x^n.-xIf the-xflag is specified, factors will be printed in hexadecimal format.DIAGNOSTICS

Out of range or invalid input results in an appropriate error message to standard error.AUTHORS

Originally by Landon Curt Noll. NetBSD 10.99 October 12, 2020 NetBSD 10.99

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.