Ticket #11130: 11130-extcode-simon.patch

File 11130-extcode-simon.patch, 1.1 KB (added by cremona, 8 years ago)

Apply to extcode repository

  • pari/simon/ellQ.gp

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1305822260 -3600
    # Node ID 2ffa8fce46a180396090859a1c08bea17ba1c1d7
    # Parent  0bea93f1b4a3de2013157eec8ece8abf7fcac47e
    Small patch to ellQ.gp to work OK with pari 2.4.4
    
    diff -r 0bea93f1b4a3 -r 2ffa8fce46a1 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);
     756if( DEBUGLEVEL_ell >= 4, print("    change of basis proposed by LLL = ",U));
     757\\ the columns of U that have very small coefficients
     758\\ are either exact relations or reductions (coeff <= 20)
     759\\ the other ones are irrelevant.
     760    extra = 0;
     761    for( i = 1, d,
     762      if( vecmax(abs(U[,i])) > 20, extra += 1<<(i-1))
     763    );
     764    U = vecextract(U,1<<d-1-extra);
    760765  U = completebasis(U);
    761766if( DEBUGLEVEL_ell >= 4, print("changement de base = ",U));
    762767