diff options
author | Jim Meyering <jim@meyering.net> | 1999-08-15 18:43:54 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-08-15 18:43:54 +0000 |
commit | 1b4fc0d733a03e490cf25dd78cffc1d1f69529a0 (patch) | |
tree | 08df0612fdca6d0883e2c6633318dbfe08d1f862 /doc/sh-utils.texi | |
parent | 1cea2b41a420085f1ee3ece04d033b78a4a9a2d3 (diff) | |
download | coreutils-1b4fc0d733a03e490cf25dd78cffc1d1f69529a0.tar.xz |
factor examples
Diffstat (limited to 'doc/sh-utils.texi')
-rw-r--r-- | doc/sh-utils.texi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/sh-utils.texi b/doc/sh-utils.texi index 489205078..3b6d79f19 100644 --- a/doc/sh-utils.texi +++ b/doc/sh-utils.texi @@ -3094,6 +3094,23 @@ numbers from standard input, delimited by newlines, tabs, or spaces. The only options are @samp{--help} and @samp{--version}. @xref{Common options}. +The algorithm it uses is not very sophisticated, so for some inputs +@code{factor} runs for a long time. The hardest numbers to factor are +the products of large primes. Factoring the square of the largest 32-bit +prime number takes over 10 minutes of CPU time on a 400MHz Pentium II. + +@example +$ factor `echo '4294967291^2'|bc` +18446744030759878681: 4294967291 4294967291 +@end example + +In contrast, @code{factor} factors the largest 64-bit number in just +over a tenth of a second: + +@example +$ factor `echo '2^64-1'|bc` +18446744073709551615: 3 5 17 257 641 65537 6700417 +@end example @node seq invocation @section @code{seq}: Print numeric sequences |