Bug#950608: gmp 6.2.0 crashes postgresql-pgmp (& others)
Steven Robbins
steve at sumost.ca
Sun Feb 9 20:34:41 GMT 2020
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20200209/00d900bb/attachment.sig>
More information about the debian-science-maintainers
mailing list