Ticket #13537: trac_13537.patch

File trac_13537.patch, 1.7 KB (added by saraedum, 10 years ago)
  • sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py

    # 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): 
    972972    #    raise NotImplementedError
    973973
    974974    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
    975978        return self._xgcd(right)
    976979
    977980    #def discriminant(self):
  • sage/rings/polynomial/polynomial_element_generic.py

    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 
    781781        else:
    782782            return self.base_ring()(0)
    783783
    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 
    790784class Polynomial_padic_ring_lazy_dense(Polynomial_padic_ring_dense):
    791785    pass
    792786