Skip to content

Commit

Permalink
fix one bug in integer-valued polynomials
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Apr 15, 2023
1 parent 698bbc3 commit 853ed30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sage/rings/polynomial/integer_valued_polynomials.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,15 @@ def from_polynomial(self, p):
Traceback (most recent call last):
...
ValueError: not a polynomial with integer values: 1/3
sage: t = polygen(ZZ,'t')
sage: B = IntegerValuedPolynomialRing(QQ).B()
sage: B.from_polynomial(t+1)
B[0] + B[1]
"""
B = self.basis()
poly = self._poly
remain = p
remain = p.change_variable_name('x')
result = self.zero()
while remain:
N = remain.degree()
Expand Down

0 comments on commit 853ed30

Please sign in to comment.