bug-coreutils
[Top][All Lists]
Advanced

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

bug#12350: Composites identified as primes in factor.c (when HAVE_GMP)


From: Pádraig Brady
Subject: bug#12350: Composites identified as primes in factor.c (when HAVE_GMP)
Date: Mon, 08 Oct 2012 15:47:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 10/08/2012 11:52 AM, Jim Meyering wrote:
Pádraig Brady wrote:
On 10/07/2012 10:00 AM, Jim Meyering wrote:
Torbjorn Granlund wrote:
Jim Meyering <address@hidden> writes:

    How about this in place of the final sentence?

                                                        The new program also
        runs a deterministic primality test for each prime factor, not just
        a probabilistic test.

That's better, thanks.

I pushed the actual bug fix (for the issue mentioned in the Subject)
long ago, so I'm closing this "issue".

Regarding your upcoming improvements, please start a new thread
when you're ready to discuss them, so that your comments are not
lost in the volume of with this now-"done" bug report.

A small amendment I'm going to push is not to rely on GMP5.
GMP4 on my fedora 15 system doesn't have mpz_inits().
i.e. support for initializing multiple variables at once.

Patch is simple enough...

Hi Pádraig,

Thanks, but wouldn't that be a slight "pessimization"?
What do you think about providing the missing function instead?
Maybe not worth the hassle, but still, it would avoid adding those 12
in-function lines.  factor.c is already large and complex enough that
every little bit helps.

Borderline, but to align code with newer libs,
I've done as you suggest in the attached.

BTW, Fedora 15 passed "end of life" back in June.

Right, so it's not too old.
The same issue will affect debian stable, RHEL, ...

cheers,
Pádraig.

Attachment: factor-inits.diff
Description: Text Data


reply via email to

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