Maxima/Ecl on 32-bit machine cannot evaluate "apply(union, listify({{..}}))"
Subject: Maxima/Ecl on 32-bit machine cannot evaluate "apply(union, listify({{..}}))"
From: Stavros Macrakis
Date: Sun, 31 Aug 2008 18:48:32 -0400
Oliver,
I don't have ECL installed, but the problem is doubtless that Maxima cannot
call routines of more than some small number (63 or 64 perhaps) of
arguments. This restriction is inherited from the underlying Lisp; other
Lisps have similar unfortunate restrictions.
This restriction does *not* apply to mathematical functions, but only
programming routines. Cf:
apply(f, makelist({},i,1,200))
vs.
apply(union, makelist({},i,1,200))
Instead of using "apply", I recommend you use tree_reduce (or perhaps
lreduce, rreduce, or xreduce), which does not have this restriction.
-s
PS Barton, perhaps xreduce could call routines with up to 63 functions at a
time....
On Sun, Aug 31, 2008 at 12:15 PM, Oliver Kullmann
<O.Kullmann at swansea.ac.uk>wrote:
> Hi,
>
> on a 32-bit machine (Linux) the follow evaluation fails
> (but not on a 64-bit machine (Linux), which otherwise
> should be fairly similar):
>
> Maxima 5.16.3 http://maxima.sourceforge.net
> Using Lisp ECL 0.9l (CVS 2008-06-19 17:09)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1)
> apply(union,listify({{-6,-5,-4,-3,-2,-1},{-6,-5,-4,-3,-2,1},{-6,-5,-4,-3,-1,2},{-6,-5,-4,-3,1,2},{-6,-5,-4,-2,-1,3},{-6,-5,-4,-2,1,3},{-6,-5,-4,-1,2,3},{-6,-5,-4,1,2,3},
> {-6,-5,-3,-2,-1,4},{-6,-5,-3,-2,1,4},{-6,-5,-3,-1,2,4},{-6,-5,-3,1,2,4},{-6,-5,-2,-1,3,4},{-6,-5,-2,1,3,4},{-6,-5,-1,2,3,4},{-6,-5,1,2,3,4},{-6,-4,-3,-2,-1,5},{-6,-4,-3,-2,1,5},{-6,-4,-3,-1,2,5},{-6,-4,-3,1,2,5},{-6,-4,-2,-1,3,5},{-6,-4,-2,1,3,5},{-6,-4,-1,2,3,5},{-6,-4,1,2,3,5},{-6,-3,-2,-1,4,5},{-6,-3,-2,1,4,5},{-6,-3,-1,2,4,5},{-6,-3,1,2,4,5},{-6,-2,-1,3,4,5},{-6,-2,1,3,4,5},{-6,-1,2,3,4,5},{-6,1,2,3,4,5},{-5,-4,-3,-2,-1,6},{-5,-4,-3,-2,1,6},{-5,-4,-3,-1,2,6},{-5,-4,-3,1,2,6},{-5,-4,-2,-1,3,6},{-5,-4,-2,1,3,6},
> {-5,-4,-1,2,3,6},{-5,-4,1,2,3,6},{-5,-3,-2,-1,4,6},{-5,-3,-2,1,4,6},{-5,-3,-1,2,4,6},{-5,-3,1,2,4,6},{-5,-2,-1,3,4,6},{-5,-2,1,3,4,6},{-5,-1,2,3,4,6},{-5,1,2,3,4,6},
> {-4,-3,-2,-1,5,6},{-4,-3,-2,1,5,6},{-4,-3,-1,2,5,6},{-4,-3,1,2,5,6},{-4,-2,-1,3,5,6},{-4,-3,-2,-1,5,6},{-4,-3,-2,1,5,6},{-4,-3,!
> -1,2,5,6},{-4,-3,1,2,5,6},{-4,-2,-1,3,5,6},{-4,-2,1,3,5,6},{-4,-1,2,3,5,6},{-4,1,2,3,5,6},{-3,-2,-1,4,5,6},{-3,-2,1,4,5,6},
> {-3,-1,2,4,5,6},{-3,1,2,4,5,6},{-2,-1,3,4,5,6},{-2,1,3,4,5,6},{-1,2,3,4,5,6},{1,2,3,4,5,6}}));
>
> Unfortunately I can't show the output, since at my workplace I have only a
> 64-bit
> machine, and there it works (this I didn't expect).
>
> The above failure is rather peculiar in that apparently any changes
> in the expression makes it work; it's also not a problem with CLisp.
>