#11604: PARI qfminim bug on 32-bit systems (Sage 4.7 and 4.6.2)
---------------------------+------------------------------------------------
   Reporter:  mmasdeu      |          Owner:  was                               
                     
       Type:  defect       |         Status:  positive_review                   
                     
   Priority:  major        |      Milestone:  sage-duplicate/invalid/wontfix    
                     
  Component:  packages     |       Keywords:  pari, qfminim, ZM_lll, large 
matrix, ArchLinux, PARI/GP
Work_issues:               |       Upstream:  Fixed upstream, but not in a 
stable release.           
   Reviewer:  Marc Masdeu  |         Author:  Leif Leonhardy                    
                     
     Merged:               |   Dependencies:                                    
                     
---------------------------+------------------------------------------------

Comment(by leif):

 For the record, a bit more readable, this is the patch for PARI bug 1154:
 {{{
 #!patch
 --- src/basemath/lll.c  2011-07-17 02:01:36.000000000 +0200
 +++ src/basemath/lll.c  2011-07-17 01:35:55.000000000 +0200
 @@ -1,4 +1,4 @@
 -/* $Id: lll.c 12380 2010-06-03 12:32:58Z bill $
 +/* $Id: lll.c 12825 2011-01-14 23:09:00Z bill $

  Copyright (C) 2008  The PARI group.

 @@ -533,36 +533,25 @@
    return U? U: B;
  }

 -static long
 -good_prec(long d, double delta, double eta)
 -{
 -  double t = eta+1, rho = t*t / (delta - eta*eta);
 -  long goodprec = (ulong) (7.0 + 0.2*d + d*log2(rho)
 -      +  2.0 * log ((double) d) - log2( (eta-0.5)*(1.0-delta) ));
 -  return nbits2prec(goodprec);
 -}
 -
  /* Assume x a ZM, if ptB != NULL, set it to Gram-Schmidt (squared) norms
 */
  GEN
  ZM_lll_norms(GEN x, double DELTA, long flag, GEN *B)
  {
    pari_sp ltop = avma;
    const double ETA = 0.51;
 -  long p,prec, d, n = lg(x)-1;
 +  long p, d, n = lg(x)-1;
    GEN U;
    if (n <= 1) return lll_trivial(x, flag);
    d = lg(gel(x,1))-1;
 -  prec = good_prec(d,DELTA,ETA);
    x = RgM_shallowcopy(x);
    U = (flag & LLL_INPLACE)? NULL: matid(n);
 -  for (p = minss(3,prec); p <= prec; p++)
 +  for (p = 3; ; p++)
    {
      GEN m = fplll(&x, &U, B, DELTA, ETA, flag, p);
      if (m) return m;
      gerepileall(ltop, U? 2: 1, &x, &U);
    }
 -  pari_err(bugparier,"ZM_lll");
 -  return NULL;
 +  return NULL; /* NOT REACHED */
  }

  /********************************************************************/
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11604#comment:24>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to