Maxima vs Axiom



Michel,

You can probably redefine := as define, but then most existing Maxima code
(including 'share' packages) will no longer load correctly -- most existing
function definitions will have to be written as

          foo(...) := '( ... )

That doesn't seem like an improvement.

Apparently in your work and in Daniel's, the case of defining a function
dynamically is common.  But in most work with Maxima, it is a rare and
unusual case.  Why would you want to make it easy to handle the rare case
at the cost of making the common case clumsy?

           -s

On Sun, Nov 27, 2011 at 10:05, Michel Talon <talon at lpthe.jussieu.fr> wrote:

> Stavros Macrakis wrote:
> > Nothing "wrong" with what you're doing.  But if the variable 'x' happens
> to
> > be defined as 2 or q when you write
> >
> >     f(x) -> x^5 + x^2 - 1;
>
> This notation is nice but is it not a way to redefine the operator := such
> that it becomes "define"?
>
> By the way, i have reread the documentation about functions in maxima,
> section 36, and noted that, while it is explained that functions are noted
> f(x):= ? there is no explanation of the notation of array functions in
> 36.2.2,
> that is f[x]:=
> On the other hand evaluations problems of the sort discussed here are
> mentioned, for example:
> (%i1) [F : I, u : x];
> (%o1)                        [I, x]
> (%i2) funmake (F, [u]);
> (%o2)                         I(x)
> (%i3) define (funmake (F, [u]), cos(u) + 1);
> (%o3)                  I(x) := cos(x) + 1
> (%i4) define (arraymake (F, [u]), cos(u) + 1);
> (%o4)                   I  := cos(x) + 1
>                         x
> (%i5) define (foo (x, y), bar (y, x));
> (%o5)                foo(x, y) := bar(y, x)
> (%i6) define (ev (foo (x, y)), sin(x) - cos(y));
> (%o6)             bar(y, x) := sin(x) - cos(y)
>
> >
> > you will be defining f(x)=2 or f(x)=q^5+q^2-1, which is probably not what
> > you had in mind.
>
> This is probably why all arguments of coerce-float-funs are replaced by
> gensysms, i am referring to the example i displayed previously.
>
>
>
> --
> Michel Talon
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>