# HG changeset patch
# User John Cremona
# 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/pari/simon/ellQ.gp
+++ b/pari/simon/ellQ.gp
@@ -753,10 +753,20 @@
M = round( M*10^(default(realprecision)-10) );
U = qflll(M,4);
U = concat(U[1],U[2]);
- limgoodrelations = 0;
- while( limgoodrelations+1 <= d
- && vecmax(abs(U[,limgoodrelations+1])) < 20, limgoodrelations++);
- U = vecextract(U,1<= 4, print(" change of basis proposed by LLL = ",U));
+ \\ The columns of U that have very small coefficients (coeff < 20)
+ \\ are either exact relations or reductions. These are the ones we
+ \\ want to keep, the other ones are irrelevant.
+ keep = 0;
+ for( i = 1, d,
+ if( vecmax(abs(U[,i])) < 20, keep += 1<<(i-1))
+ );
+ U = vecextract(U, keep);
+ /* END patch from Sage Ticket #11130 to work with PARI 2.4.4 */
+
U = completebasis(U);
if( DEBUGLEVEL_ell >= 4, print("changement de base = ",U));