diff options
author | Antonio Rojas | 2018-07-09 22:10:31 +0000 |
---|---|---|
committer | Antonio Rojas | 2018-07-09 22:10:31 +0000 |
commit | c67449868cd4cb95e0981d072031487260da7c3a (patch) | |
tree | 518cf615330463a2f7c753fcbd927cbe7c8ad06d /sagemath-singular-4.1.1.patch | |
parent | fed6d6f5cf8c85a56b7f40f0c19792b8b835cc06 (diff) | |
download | aur-c67449868cd4cb95e0981d072031487260da7c3a.tar.gz |
Update singular patch
Diffstat (limited to 'sagemath-singular-4.1.1.patch')
-rw-r--r-- | sagemath-singular-4.1.1.patch | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/sagemath-singular-4.1.1.patch b/sagemath-singular-4.1.1.patch index 6471d2499acd..ad59bf23a0c7 100644 --- a/sagemath-singular-4.1.1.patch +++ b/sagemath-singular-4.1.1.patch @@ -96,13 +96,42 @@ diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sa index 809ca72c76..9610ce125d 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +@@ -4066,6 +4066,9 @@ cdef class MPolynomial_libsingular(MPolynomial): + if r.cf.type == n_Znm or r.cf.type == n_Zn or r.cf.type == n_Z2m : + raise NotImplementedError("Division of multivariate polynomials over non fields by non-monomials not implemented.") + ++ if is_IntegerRing(self._parent._base): ++ return self.change_ring(RationalField()) // right.change_ring(RationalField()) ++ + cdef int count = singular_polynomial_length_bounded(_self._poly,15) + if count >= 15: # note that _right._poly must be of shorter length than self._poly for us to care about this call + sig_on() +@@ -4744,6 +4747,9 @@ cdef class MPolynomial_libsingular(MPolynomial): + else: + _right = <MPolynomial_libsingular>right + ++ if is_IntegerRing(self._parent._base): ++ return self.change_ring(RationalField()).gcd(right.change_ring(RationalField()), algorithm, **kwds) ++ + cdef int count = singular_polynomial_length_bounded(self._poly,20) \ + + singular_polynomial_length_bounded(_right._poly,20) + if count >= 20: +@@ -4814,6 +4822,9 @@ cdef class MPolynomial_libsingular(MPolynomial): + if self._parent._base.is_finite() and self._parent._base.characteristic() > 1<<29: + raise NotImplementedError("LCM of multivariate polynomials over prime fields with characteristic > 2^29 is not implemented.") + ++ if is_IntegerRing(self._parent._base): ++ return self.change_ring(RationalField()).lcm(g.change_ring(RationalField())) ++ + cdef int count = singular_polynomial_length_bounded(self._poly,20) \ + + singular_polynomial_length_bounded(_g._poly,20) + if count >= 20: @@ -4888,7 +4888,7 @@ cdef class MPolynomial_libsingular(MPolynomial): if right.is_zero(): raise ZeroDivisionError - + - if not self._parent._base.is_field() and not is_IntegerRing(self._parent._base): + if not self._parent._base.is_field(): py_quo = self//right py_rem = self - right*py_quo return py_quo, py_rem - |