Fine -- clearly a sensible choice at the time, and I would not dream of changing that now!
John On 03/04/2008, William Stein <[EMAIL PROTECTED]> wrote: > > On Thu, Apr 3, 2008 at 12:14 PM, John Cremona <[EMAIL PROTECTED]> wrote: > > > > We have to regard 0 as a special case, I don't think there's any point > > in pretending otherwise. If all leading zeros were stripped off in > > all cases then the string representing 0 would be the empty string, > > and obviously that would be silly. > > > > I went to see what the degree of the 0 polynomial is in Sage, > > expecting one of : -Infinity, Undefined, and found it is -1. Well ok, > > that is one convention, but please do not try to convince me that it > > is anything other than a convention. > > > I'll try anyways to at least convince you that there was a > good reason at the time when I chose that convention. > I defined degree that way specifically for consistency > with Magma: > > > R<x> := PolynomialRing(RationalField()); > > Degree(R!0); > -1 > > I implemented the first version of polynomials in Sage in the very > early days of Sage, and for quite a long time consistency with > Magma was a guiding design constraint for Sage (i.e., if a lot > more people hadn't got involved, Sage/Magma could very well > have been somewhat like Octave/Matlab). > > Also, Sage didn't have any notion of infinity when I first > implemented polynomials... > > > --William > > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---