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

Commit

Permalink
28147: Doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrenet committed Jul 10, 2019
1 parent 6384e2e commit dcba409
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/sage/rings/polynomial/polynomial_element.pyx
Expand Up @@ -3642,6 +3642,29 @@ cdef class Polynomial(CommutativeAlgebraElement):
sage: S = R.fraction_field(); x = S.gen()
sage: R(1).derivative(R(x))
0
Check that :trac:`28147` is fixed::
sage: R.<x> = GF(65537)[]
sage: p = x^4 - 17*x^3 + 2*x^2 - x + 7
sage: p.derivative()
4*x^3 + 65486*x^2 + 4*x + 65536
sage: R.<x> = GF(19^2)[]
sage: p = x^4 - 17*x^3 + 2*x^2 - x + 7
sage: p.derivative()
4*x^3 + 6*x^2 + 4*x + 18
sage: R.<x> = GF(2)[]
sage: p = x^4 + x^2 + x
sage: p.derivative()
1
Check that :trac:`26844` is fixed by :trac:`28147`::
sage: A = PolynomialRing(GF(3), name='t')
sage: K = A.fraction_field()
sage: t = K.gen()
sage: t.derivative(t)
1
"""
if var is not None and var != self._parent.gen():
# call _derivative() recursively on coefficients
Expand Down

0 comments on commit dcba409

Please sign in to comment.