Noun forms of elementry arithmetic functions



Robert, Richard & list,

Many thanks indeed for explaining this.  I'm embarrassed that I missed
something as simple as "simp".   But, the suggestions were very helpful
indeed.  In particular Robert's "Minimal Maxima" paper was very clear, and
just what I needed.

The more I use Maxima, the more impressed I am with the decisions of those
who designed it.

Thanks again,
Chris


On Tue, 25 Oct 2005, Robert Dodier wrote:

> Hello Chris,
> 
> > x + 1 + x,
> >
> > without these automatically being simplified to 2*x+1.
> 
> I believe you can get what you want by using
> stuff (namely flags to control evaluation and simplification)
> that's already built-in.
> 
> You can make nouns of built-in operators. Write the operator
> name in double quotes.
> 
>   foo: ' "+" ( ' "*" (2, 3), 5)  => mplus(mtimes(2, 3), 5)
>   ev (foo, "+")  => mtimes(2, 3) + 5
>   ev (foo, "*") => mplus(6, 5)
>   ev (foo, nouns) => 11
> 
> %MPLUS, %MTIMES, etc should probably display as
> +, *, etc; that would be a mild bug in the display code.
> 
> Also simp: false$  will probably be useful to you.
> 
> I made an attempt to explain something about simplification
> and evaluation. You can judge for yourself whether it's useful.
> http://maxima.sourceforge.net/docs/tutorial/en/minimal-maxima.pdf
> 
> Also, ev is a many-splendored thing: see ev under "Command Line" at
> http://maxima.sourceforge.net/docs/manual/en/maxima_toc.html
> 
> Hope this helps,
> Robert Dodier
> 
> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>