Ticket #3111: sage-3111-extra2.patch

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

Apply after previous two

  • sage/schemes/elliptic_curves/ell_finite_field.py

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1210628456 -3600
    # Node ID ffb27cc32dbde8e49bb77966e7d5eb1b1eb08713
    # Parent  3fbbb1c4281d2b20ae52bfea9e7ccd6ece26edd3
    Changed from testing 10 random primes to 10 fixed "random" primes
    
    diff -r 3fbbb1c4281d -r ffb27cc32dbd sage/schemes/elliptic_curves/ell_finite_field.py
    a b class EllipticCurve_finite_field(Ellipti 
    10071007            sage: E.cardinality(extension_degree=100)
    10081008            1267650600228231653296516890625
    10091009
    1010         This tests the patch for trac#3111:
     1010        This tests the patch for trac#3111, using 10 primes randomly selected:
    10111011            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()       
     1012            sage: for p in [5927, 2297, 1571, 1709, 3851, 127, 3253, 5783, 3499, 4817]:
     1013            ...       G = E.change_ring(GF(p)).abelian_group()       
    10161014        """
    10171015        if not debug:
    10181016            # if we're in debug mode, always recalculate