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 <d...@math.uiuc.edu>: > #include <mpir.h> > #include <assert.h> > > 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)); > return 0; > } > > produces an assertion failure with 1.3.0 but not with 1.2.1. I > believe that could be a bug, because the integer 0 should have the > size set to 0, according to the documentation; in any case, our > (other) program doesn't work. The OS is Mac OS X 10.6. > > -- > You received this message because you are subscribed to the Google Groups > "mpir-devel" group. > To post to this group, send email to mpir-de...@googlegroups.com. > To unsubscribe from this group, send email to > mpir-devel+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/mpir-devel?hl=en. > > -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To post to this group, send email to mpir-de...@googlegroups.com. To unsubscribe from this group, send email to mpir-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en.