Hi, On 22 Okt., 16:20, "John Cremona" <[EMAIL PROTECTED]> wrote: > 2008/10/22 Robert Bradshaw <[EMAIL PROTECTED]>: > > > > > > > On Oct 22, 2008, at 5:51 AM, John Cremona wrote: > > >> 2008/10/22 mabshoff <[EMAIL PROTECTED]>: > > >>> On Oct 22, 5:14 am, "John Cremona" <[EMAIL PROTECTED]> wrote: > >>>> While working on #3318 I cam across a really terrible bug introduced > >>>> between 3.1.4 and 3.2.alpha0 in the file sage/rings/integer.pyx > >>>> which > >>>> produces the following terrible thing: > > >>>> -------------------------------------------------------------------- > >>>> -- > >>>> | SAGE Version 3.2.alpha0, Release Date: > >>>> 2008-10-20 | > >>>> | Type notebook() for the GUI, and license() for > >>>> information. | > >>>> -------------------------------------------------------------------- > >>>> -- > > >>>> sage: sage.rings.integer.GCD_list([2,2,3]) > >>>> 2 > > >>>> The problem seems to be in line 3654 of integer.pyx where there is a > >>>> missing ==0 so the break occurs immediately where it shouldn't. > > >>>> Before I open a ticket, the person reponsible for the changes in > >>>> integer.pyx should perhaps take a look. Probably the easiest way to > >>>> fix it (if that is the only problem) is for me to make the > >>>> changes in > >>>> the patch I am preparing for #3318. > > >>> Ok. Can you add a doctest in the right place to catch this issue in > >>> the future. I would suspect that #4286 is the root cause of this bug. > > >> You are right, that's where the offending line is. I'll put in a > >> suitable doctest and include it all in my (second) patch for #3118 > > > That was me...the fix is correct. That really shouldn't have made it > > in as is--thanks for catching it. >
Robert wrote the code, but I reviewed it, so that was 50% me, too. Fortunately that horrible bug was found, and fixed, before the end of the release cycle. Thanks for catching it! Cheers, gsw > No problem -- it's in the patch at #3118. > > It was weird: I made some changes to gcd() and lcm() in arith.py; and > when I doctested all of sage/rings I had one failure in > rings/polynomial/multi_polynomial_libsingular.pyx, which was the only > other file in rings/ which had need to be changed as a consequence. > Tracking that down revealed that the lcm of two polynomials in > ZZ[x,y,z] was being computed wrongly, but because of a bug which I had > not just introduced.. > > John > > > > > - Robert --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---