Ticket #11130: 11130-extcode-v2.patch

File 11130-extcode-v2.patch, 1.3 KB (added by jdemeyer, 8 years ago)
  • pari/simon/ellQ.gp

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1305822260 -3600
    # Node ID 58cbefdf4eda76ff742a8653e5f08f15c044c179
    # Parent  460febfaff4b5e980999364b670403627b09c927
    Small patch to ellQ.gp to work OK with pari 2.4.4
    
    diff --git a/pari/simon/ellQ.gp b/pari/simon/ellQ.gp
    a b  
    753753  M = round( M*10^(default(realprecision)-10) );
    754754  U = qflll(M,4);
    755755  U = concat(U[1],U[2]);
    756   limgoodrelations = 0;
    757   while( limgoodrelations+1 <= d
    758     && vecmax(abs(U[,limgoodrelations+1])) < 20, limgoodrelations++);
    759   U = vecextract(U,1<<limgoodrelations-1);
     756
     757  /* BEGIN patch to work with PARI 2.4.4 */
     758  /* AUTHORS: John Cremona, Jeroen Demeyer (Sage Trac #11130) */
     759if( DEBUGLEVEL_ell >= 4, print("    change of basis proposed by LLL = ",U));
     760  \\ The columns of U that have very small coefficients (coeff < 20)
     761  \\ are either exact relations or reductions.  These are the ones we
     762  \\ want to keep, the other ones are irrelevant.
     763  keep = 0;
     764  for( i = 1, d,
     765    if( vecmax(abs(U[,i])) < 20, keep += 1<<(i-1))
     766  );
     767  U = vecextract(U, keep);
     768  /* END patch from Sage Ticket #11130 to work with PARI 2.4.4 */
     769
    760770  U = completebasis(U);
    761771if( DEBUGLEVEL_ell >= 4, print("changement de base = ",U));
    762772