| 1 | initial version |
xgcd should be computed over ZZ, not R - e.g.:
g, u, v = xgcd(poly_elem.change_ring(ZZ), poly_modulus.change_ring(ZZ))
| 2 | No.2 Revision |
xgcd should be computed over ZZ, not R - e.g.:
g, u, v = xgcd(poly_elem.change_ring(ZZ), poly_modulus.change_ring(ZZ))
and the formula for inverse should be changed to
inverse = GaloisRing(u)/g
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.