[Ecls-list] bug with Ecl 11.1.1

Oliver Kullmann O.Kullmann at swansea.ac.uk
Fri Jan 21 18:17:22 UTC 2011


Hello,

perhaps you've seen on the Maxima mailing list,
there appears to be a bug with Ecl version 11.1.1:

We get the result "next_prime(113) = 121 = 11^2", where the
problem is that, to cite,

---------
  (loop while 1 do
       (dolist (p *small-primes*)
     (if (= (mmod n p) 0) (return))
     (if (>= (* p p) n) (return-from next-prime-det n)))
       (incf n (nth (mmod n 210) deltaprimes)))

For whatever reason, ecl doesn't execute the loop.  It should because
"1" is equivalent to true.  When I change the 1 to T, ecl returns 127 as
the next prime.
----------

With best regards

Oliver





More information about the ecl-devel mailing list