Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#6120 closed defect (fixed)

[with patch, positive review] P(0).total_degree() should return -1 for multivariate polynomial rings

Reported by: Martin Albrecht Owned by: Martin Albrecht
Priority: major Milestone: sage-4.0.1
Component: commutative algebra Keywords:
Cc: John Cremona, Simon King Merged in: 4.0.1.alpha0
Authors: Martin Albrecht Reviewers: Alex Ghitza
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

but it returns 0 now.

Attachments (1)

mpoly_deg_0.patch (1.3 KB) - added by Martin Albrecht 14 years ago.

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by Martin Albrecht

Attachment: mpoly_deg_0.patch added

comment:1 Changed 14 years ago by Martin Albrecht

Cc: John Cremona Simon King added

comment:2 Changed 14 years ago by John Cremona

At the same time we *must* do the same for the degree of univariate polynomials! there is a degree() function in rings/polynomial/polynomial_element_generic.py which currently returns -1 for deg(0), but there may be other places too -- maybe malb knows if there are others?

comment:3 Changed 14 years ago by Martin Albrecht

I checked a few implementations, they all seem to agree that deg(0) == -1.

comment:4 Changed 14 years ago by Alex Ghitza

Summary: [with patch, needs review] P(0).total_degree() should return -1 for multivariate polynomial rings[with patch, positive review] P(0).total_degree() should return -1 for multivariate polynomial rings

Looks good, applies (with some fuzz) to 4.0.rc2, and passes doctests in sage/rings/polynomial.

comment:5 Changed 14 years ago by Mike Hansen

Resolution: fixed
Status: newclosed

Merged in 4.0.1.alpha0.

comment:6 Changed 14 years ago by Mike Hansen

Authors: Martin Albrecht
Merged in: 4.0.1.alpha0
Reviewers: Alex Ghitza
Note: See TracTickets for help on using tickets.