#11652: MPolynomial_libsingular reports the wrong degree
----------------------------------------------+-----------------------------
Reporter: saraedum | Owner: malb
Type: defect | Status: needs_work
Priority: minor | Milestone:
Component: commutative algebra | Keywords: singular,
polynomial, degree, sd35, sd35.5
Work_issues: code and docu do not match | Upstream: Reported
upstream. Little or no feedback.
Reviewer: William Stein, Paul Zimmermann | Author: saraedum,
William Stein
Merged: | Dependencies:
----------------------------------------------+-----------------------------
Changes (by newvalueoldvalue):
* keywords: singular, polynomial, degree, sd35 => singular, polynomial,
degree, sd35, sd35.5
* reviewer: wstein => William Stein, Paul Zimmermann
* status: needs_review => needs_work
* work_issues: => code and docu do not match
* author: saraedum, wstein => saraedum, William Stein
Comment:
all doctests pass on top of sage-4.8.alpha6 on x64, however:
{{{
sage: R.<p,q,t> = ZZ[]
sage: poly = p+q^2+t^3
sage: poly = poly.polynomial(t)[0]
sage: poly.degree(p)
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
...
TypeError: argument must canonically coerce to parent
}}}
I don't understand since the documentation says:
{{{
sage: poly.degree?
...
Definition: poly.degree(self, x=None, std_grading=False)
...
Return the maximal degree of this polynomial in "x", where "x" must
be one of the generators for the parent of this polynomial.
}}}
Indeed {{{p}}} is one of those generators:
{{{
sage: p in poly.parent().gens()
True
}}}
Thus either the code or the documentation has to be fixed.
Paul
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11652#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.