Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FractionFieldElement lacks derivative method #2545

Closed
burcin opened this issue Mar 16, 2008 · 6 comments
Closed

FractionFieldElement lacks derivative method #2545

burcin opened this issue Mar 16, 2008 · 6 comments

Comments

@burcin
Copy link

burcin commented Mar 16, 2008

Attached patch adds a derivative method to FractionFieldElements, and fixes a bug in the _derivative method of Polynomial_rational_dense.

So these now work:

sage: R = ZZ['x']
sage: S = R.fraction_field(); x = S.gen()
sage: R(1).derivative(R(x))
0

sage: F = FractionField(PolynomialRing(RationalField(),'x,y'))
sage: x,y = F.gens()
sage: (1/(x+y)).derivative(x,y)
2/(x^3 + 3*x^2*y + 3*x*y^2 + y^3)

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/2545

@burcin burcin added this to the sage-2.11 milestone Mar 16, 2008
@burcin burcin self-assigned this Mar 16, 2008
@burcin
Copy link
Author

burcin commented Mar 16, 2008

derivative method for FractionFieldElement

@aghitza
Copy link

aghitza commented Mar 16, 2008

comment:1

Attachment: sage_fraction_field_derivative.patch.gz

This appears to work as advertised. I have one request: the docstrings for derivative() and _derivative() refer to "the derivative of this polynomial", which is bad since these elements are (most of the time) not polynomials. This should be replaced with "rational function" or something similar.

@aghitza aghitza changed the title FractionFieldElement lacks derivative method [positive review pending minor change] FractionFieldElement lacks derivative method Mar 16, 2008
@burcin
Copy link
Author

burcin commented Mar 16, 2008

new patch with requested doc changes

@burcin
Copy link
Author

burcin commented Mar 16, 2008

comment:2

Attachment: 2545-sage_fraction_field_derivative-1.patch.gz

You're right, I copied the text from the docstring for polynomials, and forgot to change it. :)

attachment: 2545-sage_fraction_field_derivative-1.patch replaces "polynomial" with "rational function" as suggested.

@aghitza
Copy link

aghitza commented Mar 16, 2008

comment:3

Cool. I'm satisfied.

@aghitza aghitza changed the title [positive review pending minor change] FractionFieldElement lacks derivative method FractionFieldElement lacks derivative method Mar 16, 2008
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Mar 18, 2008

comment:4

Merged in Sage 2.11.alpha0

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Mar 18, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants