[Ecls-list] bug with Ecl 11.1.1

 [Ecls-list] bug with Ecl 11.1.1 From: Oliver Kullmann - 2011-01-21 18:17:29 ```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 ```

 [Ecls-list] bug with Ecl 11.1.1 From: Oliver Kullmann - 2011-01-21 18:17:29 ```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 ```
 Re: [Ecls-list] bug with Ecl 11.1.1 From: Juan Jose Garcia-Ripoll - 2011-01-21 19:02:16 Attachments: Message as HTML ```On Fri, Jan 21, 2011 at 7:17 PM, Oliver Kullmann wrote: > perhaps you've seen on the Maxima mailing list, > there appears to be a bug with Ecl version 11.1.1: I no longer read the Maxima mailing list. Thanks for forwarding this bug report. Juanjo -- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com ```
 Re: [Ecls-list] bug with Ecl 11.1.1 From: Juan Jose Garcia-Ripoll - 2011-01-21 19:47:35 Attachments: Message as HTML ```On Fri, Jan 21, 2011 at 7:17 PM, Oliver Kullmann wrote: > (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. > Bug identified. It was a typo in the code that determines the value of a compiled constant. AFAI can tell, it only affects logical expressions in which *constant* integers or floats are used as true/false values. I will produce a patched release soon to fix this (the fix is in CVS and will be tested tonight) Juanjo -- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com ```