projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Describe the Lim-Lee prime stuff.
[u/mdw/catacomb]
/
limlee.c
diff --git
a/limlee.c
b/limlee.c
index
705a2f1
..
dd03866
100644
(file)
--- a/
limlee.c
+++ b/
limlee.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-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
*
*
* Generate Lim-Lee primes
*
@@
-30,6
+30,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: limlee.c,v $
/*----- 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!
*
* 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;
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);
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);
}
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 *));
}
*nf = nn;
*f = vv = xmalloc(nn * sizeof(mp *));
}
-
+
for (i = 0; i < mm; i++) {
if (c[i] && vv)
*vv++ = v[i];
for (i = 0; i < mm; i++) {
if (c[i] && vv)
*vv++ = v[i];