[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: factor inconsistencies/limits?

From: Jim Meyering
Subject: Re: factor inconsistencies/limits?
Date: Fri, 25 Jul 2008 12:57:54 +0200

Linda Walsh <address@hidden> wrote:
> I was just watching google desktop -- that's supposed to index in background
> using up 75% of my cpu(s) (3 out of 4) and wanted to try something
> cpu-intensive to see if it would back-off (it doesn't).
> I decided maybe factoring a large int might do the trick.  So I popped into my
> "cygwin/win32" window and started trying numbers with factor.

Size isn't the problem.  e.g, 2^64-1 is factored almost immediately.
However, it takes much longer to factor the worst-case number,
18446743979220271189, which is smaller.
See "info coreutils factor" for details.

Factor should work fine up to 2^64-1:

  # factor $(echo 2^64-1|bc)
  18446744073709551615: 3 5 17 257 641 65537 6700417

Actually, I've wanted coreutils' factor program to work
with arbitrary-precision numbers for a long time.
This is mentioned briefly in TODO.  For more detail, see these
search results:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]