]> git.ipfire.org Git - thirdparty/coreutils.git/commit
factor: don’t give up before last prime in table
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 12 Jun 2025 20:45:57 +0000 (13:45 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Jul 2025 00:12:39 +0000 (17:12 -0700)
commit5d3fdfd04b5dfa6bd1dc63d48f44c7325561a6c1
tree83996771e5ad3a13589e53fe4566d7dcb686d3d7
parent38c63d58d0f895b791762221105983bf46e3fdbf
factor: don’t give up before last prime in table

* src/factor.c (prime_p, prime2_p, mp_prime_p): Do not skip the
flag_prove_primality test for the last prime in the table, i.e.,
when r == PRIMES_PTAB_ENTRIES - 1.
(mp_prime_p): There is no longer a need for the ret1 label or goto.
src/factor.c