Skip to content

Commit

Permalink
suggested details
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Jan 18, 2024
1 parent c7745fe commit 936661d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/rings/rational_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -1659,12 +1659,12 @@ def _factor_univariate_polynomial(self, f):
(10) * (x^5 - 1/10)
sage: QQ._factor_univariate_polynomial(10*x^5 - 10)
(10) * (x - 1) * (x^4 + x^3 + x^2 + x + 1)
"""
G = list(f._pari_with_name().factor())
G = f._pari_with_name().factor()

# normalize the leading coefficients
F = [(f.parent()(g).monic(), int(e)) for (g, e) in zip(*G)]
P = f.parent()
F = [(P(g).monic(), int(e)) for g, e in zip(*G)]

from sage.structure.factorization import Factorization
return Factorization(F, f.leading_coefficient())
Expand Down

0 comments on commit 936661d

Please sign in to comment.