From 8edd52d83484f61974a979ed56245aa0d25e2b64 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 12 Nov 2024 07:03:12 +0100 Subject: [PATCH] heuristically, polynomials tend to be monic Co-authored-by: mathzeta <90798584+mathzeta@users.noreply.github.com> --- src/sage/categories/unique_factorization_domains.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/categories/unique_factorization_domains.py b/src/sage/categories/unique_factorization_domains.py index fd61317eaa1..b676fef9839 100644 --- a/src/sage/categories/unique_factorization_domains.py +++ b/src/sage/categories/unique_factorization_domains.py @@ -179,7 +179,7 @@ def content(X): """ Return the content of ``X`` up to a unit. """ - X_it = iter(X.coefficients()) + X_it = reversed(X.coefficients()) x = next(X_it) if x.is_unit(): return None