Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 7777342

Browse files
committed
15304: doctest
1 parent 06dbbff commit 7777342

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sage/symbolic/expression.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,6 +2033,12 @@ cdef class Expression(CommutativeRingElement):
20332033
sage: el = -1/2*(2*x^2 - sqrt(2*x - 1)*sqrt(2*x + 1) - 1)
20342034
sage: el.is_polynomial(x)
20352035
False
2036+
2037+
Check that negative exponents are handled (:trac:`15304`)::
2038+
2039+
sage: y = var('y')
2040+
sage: (y/x).is_polynomial(x)
2041+
False
20362042
"""
20372043
cdef Expression symbol0 = self.coerce_in(var)
20382044
return self._gobj.is_polynomial(symbol0._gobj)

0 commit comments

Comments
 (0)