I think the issue has to do with plot2d, not with plain
evaluation: what does plot2d do when it gets a function "f"
to plot?
One of the problems here (for me, anyway) is that
Mathematica and Maxima "plot" have opposite behaviors:
Mathematica's plot routine "holds", in its terminology, the
function "f" passed to it unevaluated, and then evaluates
"f" at each point. Maxima, as Andrej pointed out, does the
opposite, it evaluates "f" first, then passes the result
once and for all to plot2d. If "s" is symbolic when Maxima
evaluates r4, the effect is nothing. The quote in 'r4(s)
prevents evaluation by Maxima before the argument "r4" is
passed to plot2d.
Leo Butler wrote:
>
> On Thu, 12 Mar 2009, Jaime Villate wrote:
>
> < On Qua, 2009-03-11 at 18:42 -0400, Kostas Oikonomou wrote:
> < > I understand. I find this usage, i.e. distinction between
> < > "f" and "f(x)" opaque and confusing, perhaps because I am
> < > used to Mathematica, where the same effect is achieved by
> < > wrapping the function in an "evaluate()" before passing it
> < > to plot().
> <
> < How about plot2d('r4(s), [s,200,300]); ?
> < Is that less confusing?
> < I sympathize with your complaint in the sense that sin(s), without the
> < quote, would be interpreted correctly by plot2d but my_own_sin(s) not.
>
> I must admit that I am confused by this. If you define
>
> f(s) := block([t:bfloat(s)], sin(t));
>
> then shouldn't maxima evaluate f(s) to be sin(bfloat(s))?
>
>
> Leo
>