On Sunday, February 9, 2020 9:54:02 A.M. CST Marco Bodrato wrote: > Ciao, > > From > https://ci.debian.net/data/autopkgtest/testing/arm64/libm/libmath-gmp-perl/4 > 229384/log.gz I read the following: > > # Failed test 'Test worked: $x = > Math::GMP->new("3878888047");Math::GMP::probab_prime($x,25);' > # at t/01_gmppm.t line 192. > # got: '2' > # expected: '1' > > > From the manual of GMP > https://gmplib.org/manual/Number-Theoretic-Functions.html I read the > following: > > Function: int mpz_probab_prime_p (const mpz_t n, int reps) > Determine whether n is prime. Return 2 if n is definitely prime, > return 1 if n is probably prime (without being certain), or return 0 if > n is definitely non-prime. > > So, if the new release of the library is able to answer that the number > 3878888047 is prime, and not only "probably" prime... This should not be > marked as a regression...
Indeed! Thanks for investigating. An improvement could be simply that all tests of this function (and any similar?) should be written to expect non- zero, rather than superficially 1 or 2. Is there a bug for libmath-gmp-perl for this test suite issue? Best, -Steve
signature.asc
Description: This is a digitally signed message part.