Describe the binary extended Euclidean algorithm more accurately. I checked the former description against the libtommath code, and I can't see how it worked. But this version seems to work now.