I'm trying to use the gcdext function in gmpy2 but I always get the result (0,0,1) regardless of what I put as the arguments. I expect it's a bug, but just to check, should this result in (0,0,1) or not?
from gmpy2 import *
print(gcdext(13, 21)) #Should be (1,-8,5)?
It is a bug in converting from Python long to the internal mpz type. As a quick work-around, convert the arguments to mpz first.
BTW, I'm the maintainer of gmpy2. Can you open an issue at http://code.google.com/p/gmpy/ ?
Update: This bug is fixed in gmpy2 2.0.0b2.