Re: Maxima ref. manual (object types)



On Wed, 22 Dec 2004 12:29:00 -0800, Richard Fateman
<fateman@cs.berkeley.edu> wrote:
> It is an important point, I think that sin(x) and first(list) are conceptually
> different, and that the word "function" is overloaded....
> ... Is f(x) a procedure function or is f a mathematical function with
> (say) simplification rules?

I agree that this is an important distinction, which in some
semi-consistent way corresponds to the noun/verb distinction in
Maxima: 'integrate(x,x) is a mathematical expression, integrate(x,x)
is a command.

But things are rather a mess in Maxima itself -- not to mention the
documentation, which is what this threat started out about.

'sin' is the archetypal simplifying mathematical function.  So
'(sin(0)) == 'sin(0) => 0 and '(sin(-1)) == 'sin(-1) => -sin(1).

How about 'abs'?  It certainly simplifies in some cases: abs(x*y) ==
'(abs(x*y)) => abs(x)*abs(y).  But it others, it acts procedurally:
'abs(x*y) => abs(x*y); '(abs(%i)) == 'abs(%i) => abs(%i), though
abs(%i) => 1.

Then there's the inconsistent behavior of the verb forms:
ev(sin(1),nouns) == sin(1.0)=> 0.84 -- what does numerical evaluation
have to do with being a procedure?? -- but ev(abs(1+%i)) => sqrt(2),
not 1.41.

Good documentation is nice.  Good design is even nicer....

           -s