define (basic)



I think you are leaving out the step that caused your problem, which is why
Jaime couldn't reproduce it.  When reporting bugs, please be sure that your
problem is *repeatable* with the *exact *procedure you are reporting. Also,
please report the full Maxima version using build_info().

Here is what I think happened:


y=m^2;
define (x[m],rhs(%));        x[m];

x[m]   => m^2         <<< this is the step you left out

z=m^3;
define (x[m],rhs(%));        x[m];


Defining x[m] as a function defines a *memoizing* function; once a value
has been calculated for a given value, it saves it and doesn't recalculate
it.  To reset that, do kill(x). That kills all definitions attached to x.

           -s



On Mon, Dec 16, 2013 at 8:35 AM, Ricardo JF <rcrdjf at hotmail.com> wrote:

> Hi friends,
>
> why x[m] doesn't change to m^3
>
> ........
> y=m^2;
> define (x[m],rhs(%));        x[m];
> z=m^3;
> define (x[m],rhs(%));        x[m];
> ........
> why x[m]=m^2 ?
>
> thanks.
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>