Ticket #3674: sage-trac3674new-extra3.patch

File sage-trac3674new-extra3.patch, 2.2 KB (added by cremona, 9 years ago)
  • sage/schemes/elliptic_curves/ell_rational_field.py

    # HG changeset patch
    # User tobi@laptop
    # Date 1218464346 -7200
    # Node ID 7dea9cd05ceab9564683e7b9d624737beed0d050
    # Parent  b4bdd819f08911aec9ba47ab462c7a9bcc39b1c5
    should apply after sage-trac3674new-extra2.
    
    diff -r b4bdd819f089 -r 7dea9cd05cea sage/schemes/elliptic_curves/ell_rational_field.py
    a b class EllipticCurve_rational_field(Ellip 
    37873787            set([2, 3, 4])
    37883788            starting search of remaining points using coefficient bound  6
    37893789            x-coords of extra integral points:
    3790             set([2, 3, 4, 37, 406, 8, 11, 14, 816, 52, 21, 342, 93])
     3790            set([2, 3, 4, 37, 8, 342, 11, 14, 816, 52, 21, 406, 93])
    37913791            Total number of integral points: 18
    37923792
    37933793        It is also possible to not specify mw_base, but then the
    class EllipticCurve_rational_field(Ellip 
    39093909                       
    39103910            # We use a naive method when the number of possibilities is small:
    39113911
    3912             if r==1 or N<=10:
     3912            if r==1 and N<=10:
    39133913                for P in multiples(mw_base[0],N+1):
    39143914                    use_t(P)
    39153915                return xs
    class EllipticCurve_rational_field(Ellip 
    40134013            e1,e2,e3 = ei
    40144014            if r >= 2: #preprocessing of mw_base only necessary if rank > 1
    40154015                mw_base = point_preprocessing(mw_base) #at most one point in
    4016                                                        #E^{egg}, saved in P_egg
     4016                                                       #E^{egg}
    40174017
    40184018        elif disc < 0: # one real component => 1 root in RR (=: e3),
    40194019                       # 2 roots in C (e1,e2)
    class EllipticCurve_rational_field(Ellip 
    40944094            m = M.identity_matrix()
    40954095            for i in range(r):
    40964096                m[i, r] = R(c*mw_base_log[i]).round()
    4097             m[r,r] = R(c*w1).round()
     4097            m[r,r] = max(1,R(c*w1).round()) #ensures that m isn't singular
    40984098   
    40994099            #LLL - implemented in sage - operates on rows not on columns
    41004100            m_LLL = m.LLL()