On Sun, Apr 5, 2009 at 9:49 PM, ARMAND BRUMER <bru...@fordham.edu> wrote: > Hi William, > > I just did everything as you suggested and got no errors. > > Still the following polynomials caused problems with genus2reduction(0,f). > So the pari connection is not fixed... > > > f1=x^6 + 4*x^5 - 24*x^4 - 16*x^3 - 52*x^2 - 48*x > f2=x^6 + 4*x^5 + 24*x^4 + 32*x^3 + 56*x^2 + 48*x + 24 > f3=24*x^5 + 56*x^4 + 76*x^3 + 33*x^2 - 4*x - 20 > f4=-3*x^6 + 6*x^5 - 25*x^4 + 36*x^3 - 69*x^2 + 38*x - 39 > > Good night from this end! >
This is a bug in genus2reduction that doesn't have anything to do with the pari problem that I *did* fix. Calling genus2reduction directly yields "bug28", which looks serious: ------------------------------------------ sage: !genus2reduction enter Q(x) : 0 enter P(x) : x^6+4*x^5-24*x^4-16*x^3-52*x^2-48*x factorization CPU time = 7 a minimal equation over Z[1/2] is : y^2 = 729*x^6+2268*x^5+2664*x^4+1520*x^3+428*x^2+48*x factorization of the minimal (away from 2) discriminant : [2,34;3,16;5,1] p=2 (potential) stable reduction : (V), j1+j2=0, j1*j2=0 p=3 (potential) stable reduction : (VII) reduction at p : bug28 ------------------------------------------ This could be very hard to fix, except maybe for Qing Liu, who isn't looking at this stuff anymore. > The improvement is that sage is willing to do another example, > interactively, after running into one of these. Of course, a program running > into such examples would stop! Sage has a something called "exception handling", which you might like very much. You can write scripts that will *never* stop even if they hit almost arbitrary errors in Sage. Watch this (note that the indentation is important): Run this code: R.<x> = ZZ[] data = [] for i in range(300): f = R.random_element(degree=6) try: data.append((f,genus2reduction(0,f))) except Exception, msg: data.append((f, 'fail')) Then: sage: len(data) 300 sage: len([z for z in data if z[1] != 'fail']) 276 Read more about try/except here: http://docs.python.org/tutorial/errors.html William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---