Factor (Unix)
   HOME

TheInfoList



OR:

On
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
, Plan 9, and
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
computer systems, factor is a utility for factoring an integer into its
prime factors A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
.


History

''factor'' first appeared on 5th edition
Research Unix The term "Research Unix" refers to early versions of the Unix operating system for DEC PDP-7, PDP-11, VAX and Interdata 7/32 and 8/32 computers, developed in the Bell Labs Computing Sciences Research Center (CSRC). History The term ''Research ...
in 1974, as a "user maintained" utility (
section Section, Sectioning or Sectioned may refer to: Arts, entertainment and media * Section (music), a complete, but not independent, musical idea * Section (typography), a subdivision, especially of a chapter, in books and documents ** Section sign ...
6 of the
manual Manual may refer to: Instructions * User guide * Owner's manual * Instruction manual (gaming) * Online help Other uses * Manual (music), a keyboard, as for an organ * Manual (band) * Manual transmission * Manual, a bicycle technique similar to ...
). 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 Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
, including commercial Unixes and
BSD The Berkeley Software Distribution or Berkeley Standard Distribution (BSD) is a discontinued operating system based on Research Unix, developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berk ...
. In some variants of Unix, it is classified as a "game" more than a serious utility, and therefore documented in section 6. A
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
version of the ''factor'' utility was written for the
GNU GNU () is an extensive collection of free software (383 packages as of January 2022), which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operat ...
project by Paul Rubin, in 1986. It is now available on all
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
distributions as part of the
GNU Core Utilities The GNU Core Utilities or coreutils is a package of GNU software containing implementations for many of the basic tools, such as cat, ls, and rm, which are used on Unix-like operating systems. In September 2002, the ''GNU coreutils'' were cr ...
. In 2008, GNU ''factor'' started to use the GNU MP library for
arbitrary-precision arithmetic In computer science, arbitrary-precision arithmetic, also called bignum arithmetic, multiple-precision arithmetic, or sometimes infinite-precision arithmetic, indicates that calculations are performed on numbers whose digits of precision are li ...
, 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 Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
as part of the
UnxUtils UnxUtils is a collection of ports of common GNU Unix-like utilities to native Win32, with executables only depending on the Microsoft C- runtime msvcrt.dll. The collection was last updated externally on April 15, 2003, by Karl M. Syring. The mo ...
collection of
native Native may refer to: People * Jus soli, citizenship by right of birth * Indigenous peoples, peoples with a set of specific rights based on their historical ties to a particular territory ** Native Americans (disambiguation) In arts and entert ...
Win32 The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
ports A port is a maritime facility comprising one or more wharves or loading areas, where ships load and discharge cargo and passengers. Although usually situated on a sea coast or estuary, ports can also be found far inland, such as H ...
of common GNU Unix-like utilities.


Syntax

factor
umber Umber is a natural brown earth pigment that contains iron oxide and manganese oxide. In its natural form, it is called raw umber. When Calcination, calcined, the color becomes warmer and it becomes known as burnt umber. Its name derives from '' ...
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


External links


GNU's factor manual pageFreeBSD's factor man page
{{Core Utilities commands Unix software Plan 9 commands