Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the algorithm behind the factor command in linux?

The factor command prints the prime factors of specified integer NUMBER.

When I tried it

factor 12345678912345678912

even for such big numbers, it results within mills.

Which algorithm is it using?

like image 981
Eight Avatar asked Jun 22 '12 11:06

Eight


People also ask

What is factor command in Linux?

The factor command in Linux is used to print the prime factors of the given numbers, either given from command line or read from standard input. The numbers given through standard input may be delimited by tabs, spaces or newlines. Syntax: factor [NUMBER]

What is the use of file command in Linux?

The Linux file command helps determine the type of a file and its data. The command doesn't take the file extension into account, and instead runs a series of tests to discover the type of file data. In this tutorial, we will show you how the file command works and how to use it.


1 Answers

Gnu coreutils manual informs that Pollard's rho algorithm is being used.

http://www.gnu.org/software/coreutils/manual/html_node/factor-invocation.html

like image 151
Rozuur Avatar answered Sep 29 '22 12:09

Rozuur