# HG changeset patch
# User Julian Rueth <julian.rueth@gmail.com>
# Date 1348669702 0
# Node ID 7ffe38b585130075a207b9069d9f0d72c0e231d6
# Parent 698ec14c513f99fa5a3a7aeca982cc14fd249a89
Trac 13439: added a stopgap warning about incorrect xgcd computations
diff --git a/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py b/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py
a
|
b
|
class Polynomial_padic_capped_relative_dense(Polynomial_generic_domain): |
972 | 972 | # raise NotImplementedError |
973 | 973 | |
974 | 974 | def xgcd(self, right): |
| 975 | from sage.misc.stopgap import stopgap |
| 976 | stopgap("Extended gcd computations over p-adic fields are performed using the standard Euclidean algorithm which might produce mathematically incorrect results in some cases.", 13439) |
| 977 | |
975 | 978 | return self._xgcd(right) |
976 | 979 | |
977 | 980 | #def discriminant(self): |
diff --git a/sage/rings/polynomial/polynomial_element_generic.py b/sage/rings/polynomial/polynomial_element_generic.py
a
|
b
|
class Polynomial_padic_field_dense(Polynomial_padic_generic_dense, Polynomial_ge |
781 | 781 | else: |
782 | 782 | return self.base_ring()(0) |
783 | 783 | |
784 | | def _xgcd(self, other): |
785 | | H = Polynomial_generic_dense_field._xgcd(self, other) |
786 | | c = ~H[0].leading_coefficient() |
787 | | return c * H[0], c * H[1], c * H[2] |
788 | | |
789 | | |
790 | 784 | class Polynomial_padic_ring_lazy_dense(Polynomial_padic_ring_dense): |
791 | 785 | pass |
792 | 786 | |