Skip to content

Commit

Permalink
polys: removed PolyElement.extract_ground()
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed May 6, 2021
1 parent 87dcacf commit 7c2d488
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
8 changes: 7 additions & 1 deletion diofant/polys/euclidtools.py
Expand Up @@ -194,7 +194,13 @@ def _zz_heu_gcd(self, f, g):
x0 = ring.gens[0]
domain = ring.domain

gcd, f, g = f.extract_ground(g)
fc = f.content()
gc = g.content()

gcd = self.domain.gcd(fc, gc)

f = f.quo_ground(gcd)
g = g.quo_ground(gcd)

f_norm = f.max_norm()
g_norm = g.max_norm()
Expand Down
12 changes: 0 additions & 12 deletions diofant/polys/rings.py
Expand Up @@ -1221,18 +1221,6 @@ def trunc_ground(self, p):
poly._strip_zero()
return poly

def extract_ground(self, g):
f = self
fc = f.content()
gc = g.content()

gcd = f.ring.domain.gcd(fc, gc)

f = f.quo_ground(gcd)
g = g.quo_ground(gcd)

return gcd, f, g

def _norm(self, norm_func):
if not self:
return self.ring.domain.zero
Expand Down

0 comments on commit 7c2d488

Please sign in to comment.