(limlee): Bug fix. Old versions didn't set the filter step if @ql@ was
authormdw <mdw>
Sat, 29 Jul 2000 09:58:32 +0000 (09:58 +0000)
committermdw <mdw>
Sat, 29 Jul 2000 09:58:32 +0000 (09:58 +0000)
an exact divisor of @pl@.

limlee.c

index 705a2f1..dd03866 100644 (file)
--- a/limlee.c
+++ b/limlee.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: limlee.c,v 1.2 2000/07/26 18:00:00 mdw Exp $
+ * $Id: limlee.c,v 1.3 2000/07/29 09:58:32 mdw Exp $
  *
  * Generate Lim-Lee primes
  *
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: limlee.c,v $
+ * Revision 1.3  2000/07/29 09:58:32  mdw
+ * (limlee): Bug fix.  Old versions didn't set the filter step if @ql@ was
+ * an exact divisor of @pl@.
+ *
  * Revision 1.2  2000/07/26 18:00:00  mdw
  * No footer line!
  *
@@ -179,10 +183,10 @@ mp *limlee(const char *name, mp *d, mp *newp,
   if (oev && oev(PGEN_BEGIN, &ev, oec) == PGEN_ABORT)
     goto fail;
 
+  pf.step = 2;
   if (qql) {
     dstr_putf(&dn, "%s [+]", name);
     qq = mprand(d, qql, r, 1);
-    pf.step = 2;
     qq = pgen(dn.buf, qq, qq, iev, iec,
              0, pgen_filter, &pf, rabin_iters(qql), pgen_test, &rb);
   }
@@ -301,7 +305,7 @@ done: {
       *nf = nn;
       *f = vv = xmalloc(nn * sizeof(mp *));
     }
-  
+
     for (i = 0; i < mm; i++) {
       if (c[i] && vv)
        *vv++ = v[i];