Hello, On sage-support somebody reported the following strange behavior sage: gcd(6/1,2/1) 2 sage: xgcd(6/1,2/1) (1, 1/6, 0)
I opened #17671 for that and it comes from the fact that there is a custom gcd for QuotientFields but no associated xgcd. I did it and it work fine. But, in order to get this behavior fixed once for all I introduced a test "_test_gcd_vs_xgcd" in the category CommutativeRings to check compatibility between gcd and xgcd if they are implemented. But it appear that some polynomial ring just fail: sage: TestSuite(Zmod(10)['a']).run() Failure in _test_gcd_vs_xgcd: ... AssertionError: The methods gcd and xgcd disagree: gcd(a,2*a^2 + 2) = 1 xgcd(a,2*a^2 + 2) = (2, 8*a, 1) ------------------------------------------------------------ The following tests failed: _test_gcd_vs_xgcd My question is: do we have a use case where gcd and xgcd should disagree? Vincent PS: On a related note, the following looks very wrong to me {{{ sage: x = polygen(ZZ) sage: (x+2).gcd(x+4) 1 }}} -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.