Ticket #3111: sage-3111-extra.patch

File sage-3111-extra.patch, 1.6 KB (added by cremona, 12 years ago)

Additional tp sage-3111.patch

  • sage/schemes/elliptic_curves/ell_finite_field.py

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1210627121 -3600
    # Node ID 3fbbb1c4281d2b20ae52bfea9e7ccd6ece26edd3
    # Parent  6be71336769080d20026f30bbbc803bb481ba9b0
    Final fix for #3111 (delete debugging lines and add doctest)
    
    diff -r 6be713367690 -r 3fbbb1c4281d sage/schemes/elliptic_curves/ell_finite_field.py
    a b class EllipticCurve_finite_field(Ellipti 
    10061006        Of course, there are plenty of points if we extend the field:
    10071007            sage: E.cardinality(extension_degree=100)
    10081008            1267650600228231653296516890625
     1009
     1010        This tests the patch for trac#3111:
     1011            sage: E = EllipticCurve('389a')
     1012            sage: for _ in range(10):
     1013            ...       p=random_prime(10000)
     1014            ...       if p != 389:
     1015            ...           G = E.change_ring(GF(p)).abelian_group()       
    10091016        """
    10101017        if not debug:
    10111018            # if we're in debug mode, always recalculate
    class EllipticCurve_finite_field(Ellipti 
    11911198                    print " and not ",n2
    11921199                    raise ValueError
    11931200                if n2>1:
    1194                     print "P1=",P1," of order ",P1.order(),"=",n1
    1195                     print "P2=",P2," of order ",P2.order(),"=",n2
    11961201                    if generic.linear_relation(P1,P2,operation='+')[1]!=n2:
    11971202                        print "Generators not independent!"
    11981203                        raise ValueError