From: mdw Date: Sat, 29 Jul 2000 09:58:32 +0000 (+0000) Subject: (limlee): Bug fix. Old versions didn't set the filter step if @ql@ was X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/commitdiff_plain/2f6275469096d6f482a8510de15e5b3402c26b56 (limlee): Bug fix. Old versions didn't set the filter step if @ql@ was an exact divisor of @pl@. --- diff --git a/limlee.c b/limlee.c index 705a2f1..dd03866 100644 --- 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 * @@ -30,6 +30,10 @@ /*----- 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];