Maxima/Ecl on 32-bit machine cannot evaluate "apply(union, listify({{..}}))"
Subject: Maxima/Ecl on 32-bit machine cannot evaluate "apply(union, listify({{..}}))"
From: Oliver Kullmann
Date: Tue, 2 Sep 2008 21:38:41 +0100
On Tue, Sep 02, 2008 at 04:03:51PM -0400, Stavros Macrakis wrote:
> Suggest you try this as a rough-and-ready correctness test:
>
> for N: 5 thru 5000 do (lastn:N, if length(apply(union,
> makelist({floor(i/4),floor(i/3),2.5^i},i,1,N))) # N+floor(N/3)+1 then
> error(mismatch,N));
are you sure? with ECL and CLISP (on 64 bit) I get
(%i12) for N: 5 thru 5000 do (lastn:N, if length(apply(union,makelist({floor(i/4),floor(i/3),2.5^i},i,1,N))) # N+floor(N/3)+1 then error(mismatch,N));
Maxima encountered a Lisp error:
EXPT: floating point overflow
The 2.5^i is just too big.
(Otherwise it's a funny example!)