Re: [mpir-devel] possible bug in mpz_gcdext

2010-01-30 Thread Case Vanhorsen
On Sat, Jan 30, 2010 at 2:54 PM, Bill Hart wrote: > I've placed an MPIR 1.3.1 which hopefully fixes this issue, here: > > http://www.mpir.org/mpir-1.3.1.tar.gz > > Let me know if there are further problems. I confirmed that the problem existed in gmpy with 1.3.0 and is fixed in 1.3.1. casevh > >

Re: [mpir-devel] possible bug in mpz_gcdext

2010-01-30 Thread Bill Hart
I've placed an MPIR 1.3.1 which hopefully fixes this issue, here: http://www.mpir.org/mpir-1.3.1.tar.gz Let me know if there are further problems. Bill. 2010/1/30 Bill Hart : > Hi Dan, > > Yes, there is a bug. The fix is to replace line 1130 of mpn/gcdext.c with: > > *s0size = 1 - (s0p[0] == 0)

Re: [mpir-devel] possible bug in mpz_gcdext

2010-01-30 Thread Bill Hart
Hi Dan, Yes, there is a bug. The fix is to replace line 1130 of mpn/gcdext.c with: *s0size = 1 - (s0p[0] == 0); I will issue a service release shortly to fix this issue. Can you let us know if this fixes your (other) program. Bill. 2010/1/30 Bill Hart : > Hi Dan, > > That definitely looks lik

Re: [mpir-devel] possible bug in mpz_gcdext

2010-01-30 Thread Bill Hart
Hi Dan, That definitely looks like a bug. You are correct in that size should be set to zero. It's slightly bizarre in that we haven't altered mpz_gcdext, that I recall. But we did modify mpn_gcdext, so I assume the bug is there. I'll take a look. Bill. 2010/1/30 Dan Grayson : > #include > #i

[mpir-devel] possible bug in mpz_gcdext

2010-01-30 Thread Dan Grayson
#include #include int main () { mpz_t a,b,d,u,v; mpz_init(a); mpz_init(b); mpz_init(d); mpz_init(u); mpz_init(v); mpz_set_si(a,1); mpz_set_si(b,2); mpz_gcdext(d,u,v,a,b); assert(!(u->_mp_size == 1 && u->_mp_d[0] == 0)); assert(!(v->_mp_size == 1 && v->_mp_d[0] == 0)); ret