[Maxima] use_fast_arrays : true & batch files

Barton Willis willisb at unk.edu
Wed Jul 11 08:05:34 CDT 2012

Nice example--no batching required:

(%i1) use_fast_arrays : true;
(%o1) true

(%i2) a[2*x] : 1;
(%o2) 1

(%i3) a[factor(2*x)] : 2;
(%o3) 2

(%i4) a[2*x];
(%o4) 1

(%i5) a[factor(2*x)];
(%o5) 2

(%i6) ?print([2*x, factor(2*x)]);
(%o6) [2*x,2*x]


(%i2) use_fast_arrays : false;
(%o2) false

(%i3) a[2*x] : 1;
(%o3) 1

(%i4) a[factor(2*x)] : 2;
(%o4) 2

(%i5) a[2*x];
(%o5) 2

(%i6) a[factor(2*x)];
(%o6) 2

In short, hashed arrays + use_fast_arrays : true = trouble. Maybe sticking to integer
indices is OK?

When use_fast_arrays is false, I'm not sure how Maxima handles undeclared arrays, but it
involves the function hasher--the source code comment for hasher (defined in mlisp.lisp) says:

  This is not the best way to write a hasher. But, please don't change this code or you're
  liable to break SAVE files.

OK, it's not the best (and what would that mean?).


What happens for e.g. 2*x vs. factor(2*x)? or vs. ratsimp(2*x)? -- they are also alike1 but not equal.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120711/80d6cc09/attachment.html>

More information about the Maxima mailing list