[Maxima] use_fast_arrays : true & batch files
Stavros Macrakis
macrakis at alum.mit.edu
Wed Jul 11 07:35:58 CDT 2012
What happens for e.g. 2*x vs. factor(2*x)? or vs. ratsimp(2*x)? -- they are
also alike1 but not equal.
-s
On Wed, Jul 11, 2012 at 7:54 AM, Barton Willis <willisb at unk.edu> wrote:
> Maxima appends line number and file name information to the car of an
> expression when batching a file--stuff like
>
> ((MPLUS SIMP (53 "C:/Users/Barton/Desktop/junk/rtest_aref.mac" SRC))
> $X ((MTIMES SIMP) -1 $Y))
>
> Since undeclared arrays use CL hash tables with an equal test (not alike1)
> for equality, batch files can have problems
> with undeclared arrays when use_fast_arrays is true. (CL hash tables only
> support the equality tests eq, eql, equal, and equalp.
> There is a source code comment in trans2.lisp that suggests changing the
> equality test for a hash table to alike--not going to
> happen.) Sticking to integer indices for undeclared arrays might be safe.
>
> Maxima isn't careful about preserving extra junk in the car of an
> expression, by the way.
>
> I suppose this could be fixed by scrubbing the line and file information
> from the car of an expression before it is stored or accessed
> from a CL hash table---ugh. A missing simp flag could cause problems too.
> When use_fast_arrays is false, I think this problem disappears.
>
> --Barton
>
> A regression test file that shows the problem (at least it does for me):
>
> (use_fast_arrays : true,0);
> 0$
>
> (a[%pi] : 42, 0);
> 0$
>
> a[%pi];
> 42$
>
> (remarray(a),0);
> 0$
>
> (ab[x-y] : s, 0);
> 0$
>
> ab[x-y];
> s$
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120711/4b98269b/attachment.html>
More information about the Maxima
mailing list