ni...@lysator.liu.se (Niels Möller) writes: I'm not entirely sure I understand fib-gen is supposed work. luc_limit is only assigned like this, in gen-fib.c:generate, if (mpz_cmp (l, limit) < 0) luc_limit = i-1; Looking at mini-gmp.c:mpz_cmp, I've spotted one bug, but I think that's unrelated since it affects negative numbers only. diff -r e21157bb513d mini-gmp/mini-gmp.c --- a/mini-gmp/mini-gmp.c Mon Feb 27 14:37:02 2012 +0100 +++ b/mini-gmp/mini-gmp.c Tue Feb 28 09:26:59 2012 +0100 @@ -1694,7 +1694,7 @@ mpz_cmp (const mpz_t a, const mpz_t b) else if (asize > 0) return mpn_cmp (a->_mp_d, b->_mp_d, asize); else if (asize < 0) - return -mpn_cmp (a->_mp_d, b->_mp_d, asize); + return -mpn_cmp (a->_mp_d, b->_mp_d, -asize); else return 0; } Since this happens on just a few systems, I don't think it is a simple logical bug.
I would guess it is a dependency on uninitialised data. The failing systems seem to have no working debugging environment (which I understand). -- Torbjörn _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org http://gmplib.org/mailman/listinfo/gmp-devel