Ticket #3674: sage-trac3674new-extra3.patch

File sage-trac3674new-extra3.patch, 2.2 kB (added by cremona, 4 months ago)
  • a/sage/schemes/elliptic_curves/ell_rational_field.py

    old new  
    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 
     
    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 
     
    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) 
     
    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()