infeval of a list



If "expr" is your original expression, infeval does something like

eval(expr), eval(eval(expr)), eval(eval(eval(expr))), ...   until
convergence

You expect something different:

             eval(expr), eval(expr), eval(expr), ...  until convergence

I suppose both can be useful, but the former is the definition of infeval
in Maxima.

Note also that ":" is not a declaration, but an assignment statement.

             -s



On Mon, Dec 24, 2012 at 4:57 PM, Edward A Romana <erom at earthlink.net> wrote:

> ~~~
>
> Why is it that for a list of chained variable declarations ev(list,
> infeval) does not
> seem to give expected results;
>
> For example:
>
> (%i1) a:'[x:y,y:z,z:2];
> (%o1) [x:y,y:z,z:2]
>
> (%i2) ev(a,infeval);
> (%o2) [2,2,2]
>
> we expect x:2 but
>
> (%i3) x;
> (%o3) y
>
> Defining a listev() function which evaluates until successive evaluations
> are the same...
>
> (%i1) listev(x):=block(for dummy:1 unless (is (ev(x)=ev(x))) do([ ]))$
>
> (%i2) a:'[x:y,y:z,z:2];
> (%o2) [x:y,y:z,z:2]
>
> (%i3) listev(a)$
>
> (%i4) x;
> (%o4) 2
>
> as expected.
>
> q) Is the ev infeval flag not supported for lists  ?
>
>
>
> EAR
>
> ~~~
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>