math/limlee.c: Fiddle with the large-prime heuristics.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 28 May 2017 08:25:19 +0000 (09:25 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jun 2018 23:47:54 +0000 (00:47 +0100)
Experimentation shows me that large primes just don't last very long
with the old heuristic.  Switch to another one that's more tolerant but
still weeds out no-hopers.

math/limlee.c

index 13bbc21..fbed738 100644 (file)
@@ -225,7 +225,7 @@ static int next(int rq, pgen_event *ev, limlee_stepctx *l)
 
     if (l->qq.p) {
       dist = l->u.s.disp < 0 ? -l->u.s.disp : l->u.s.disp;
-      if (dist && dist > l->u.s.steps/dist) {
+      if (dist && dist > l->u.s.steps/3) {
        l->pops->pfree(&l->qq, l);
        l->qq.p = 0;
       }