Hi John (cc: sage-devel), On Tue, May 6, 2008 at 12:58 AM, John Cremona <[EMAIL PROTECTED]> wrote: > That certainly looks like a bug in my code. Please can you send me a > complete example so I can track it down?
Please see http://trac.sagemath.org/sage_trac/ticket/3111 > You may well be the first person to use this code for real (as opposed > to made up examples for testing), which is *great*, as there are bound > to be bugs, and I really want to fix them! I'm finding your code extremely useful for some work I'm doing related to Heegner points right now. It's especially useful that I can get group structures and fast point counts over non prime fields. I tried to do similar calculations a year ago for a course I was teaching and it was a *major* pain since none of your code existed then. So thanks!! > John > > PS > I tend to put in assert() statements when testing and take them out > when I think code is bug-free, but it sounds like it's a good thing > this one is left in. assert is an *excellent* thing to use, and we should all use it much more. One of the great things about assert in Python is that if you run Python with a certain command line option it magically simply ignores all assert statements, so they cost nothing. I almost never use asserts in my code, which is stupid -- we should all be using them way way more. By the way, Allan Steel uses asserts in his Magma C code way more than anyone else I've ever seen, and look where it has got him. :-) -- William > > 2008/5/6 William Stein <[EMAIL PROTECTED]>: > > > > John, > > > > I've been computing E(GF(q)) a lot today and keep seeing this: > > > > > > > > Traceback (click to the left for traceback) > > ... > > AssertionError > > > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File > "/Users/was/papers/research/sage_notebook/sage_notebook/worksheets/admin/4/code/570.py", > > line 6, in <module> > > scan_lame(E,Integer(67)) > > File > "/Users/was/build/sage/local/lib/python2.5/site-packages/sympy/plotting/", > > line 1, in <module> > > > > File > "/Users/was/papers/research/sage_notebook/sage_notebook/worksheets/admin/4/code/569.py", > > line 10, in scan_lame > > G, phi = Emod.abelian_group() > > File > "/Users/was/build/sage/local/lib/python2.5/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py", > > line 1121, in abelian_group > > P2,n2=generic.merge_points((P2,n2),(Q,m),operation='+'); > > File > "/Users/was/build/sage/local/lib/python2.5/site-packages/sage/groups/generic.py", > > line 1127, in merge_points > > assert multiple(g1,n1,operation=operation) == identity > > AssertionError > > > > > > > > -- > > William Stein > > Associate Professor of Mathematics > > University of Washington > > http://wstein.org > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---