Skip to content

Commit

Permalink
add TODO about is_unit vs is_one
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Jan 20, 2025
1 parent 485a2a5 commit 5978331
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sage/categories/unique_factorization_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ def content(X):
# heuristically, polynomials tend to be monic
X_it = reversed(X.coefficients())
x = next(X_it)
# TODO: currently, there is no member of
# `UniqueFactorizationDomains` with `is_unit`
# significantly slower than `is_one`, see
# :issue:`38924` - when such a domain is eventually
# implemented, check whether this is a bottleneck
if x.is_unit():
return None
for c in X_it:
Expand Down

0 comments on commit 5978331

Please sign in to comment.