Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 2ec35c2

Browse files
committed
Speedup of resultant of bivariate polynomials over the rationals.
1 parent 1e75183 commit 2ec35c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/rings/polynomial/multi_polynomial_libsingular.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5039,10 +5039,10 @@ cdef class MPolynomial_libsingular(sage.rings.polynomial.multi_polynomial.MPolyn
50395039
pf = self.polynomial(y).leading_coefficient()
50405040
pg = other.polynomial(y).leading_coefficient()
50415041
while len(interpol) <= d:
5042-
if pf(x) != 0:
5043-
if pg(x) != 0:
5042+
if not pf(i).is_zero():
5043+
if not pg(i).is_zero():
50445044
interpol.append((i, U(self.subs({x:i})).resultant(U(other.subs({x:i})))))
5045-
i += 1
5045+
i += 1
50465046
V = PolynomialRing(QQ, x)
50475047
return self.parent()(V.lagrange_polynomial(interpol))
50485048

0 commit comments

Comments
 (0)