Factor (Unix)
{{lowercase}}
{{Infobox software
| name = factor
| logo =
| screenshot =
| screenshot size =
| caption =
| author = Robert Morris,
Ken Thompson
(AT&T Bell Laboratories)
| developer = Various open-source and commercial developers
| released = {{Start date and age|1974}}
| latest release version =
| latest release date =
| operating system = Unix, Unix-like, Plan 9
| platform = Cross-platform
| genre = Command
| license =
| website =
}}
On Unix, Plan 9, and Unix-like computer systems, factor is a utility for factoring an integer into its prime factors.{{man|1|factor|Plan 9}}
History
factor first appeared on 5th edition Research Unix in 1974, as a "user maintained" utility (section 6 of the manual).[http://www.vector.comm.sfu.ca/pups/PDP-11/Distributions/research/Dennis_v5/v5man.pdf manual page] from Fifth Edition Unix (section 6: "user maintained programs") In the 7th edition in 1979, it was moved into the main "commands" section of the manual (section 1). From there, the factor utility was copied to all other variants of Unix, including commercial Unixes and BSD. In some variants of Unix, it is classified as a "game" more than a serious utility, and therefore documented in section 6.[http://man.cat-v.org/unix-6th/6/factor factor manual page] from Sixth Edition Unix (section 6: "user contributed")
A free software version of the factor utility was written for the GNU project by Paul Rubin, in 1986. It is now available on all Linux distributions as part of the GNU Core Utilities. In 2008, GNU factor started to use the GNU MP library for arbitrary-precision arithmetic, allowing it to factor integers of any size, not limited by the machine's native datatypes.
The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.{{Cite web|url=http://unxutils.sourceforge.net/|title=Native Win32 ports of some GNU utilities|website=unxutils.sourceforge.net}}
Syntax
factor [number]
The command can be used by supplying an integer value. Various projects, including simple ones such as printing prime numbers, are facilitated by using this command.
References
{{Reflist}}
External links
- [https://www.gnu.org/software/coreutils/manual/html_node/factor-invocation.html GNU's factor manual page]
- [https://www.freebsd.org/cgi/man.cgi?query=factor&format=html FreeBSD's factor man page]
{{Unix commands}}
{{Core Utilities commands}}