what do these mean?



On 6/11/07, sen1 at math.msu.edu <sen1 at math.msu.edu> wrote:

> (%o4) f(x) := (0.3 x - 0.02) charfun2(x, minf, 0.2)
>   + (1.9 x - .8999999999999999) charfun2(x, 0.9, inf)
>   + (1.7 x - .7199999999999995) charfun2(x, 0.8, 0.9)
>   + (1.5 x - .5600000000000003) charfun2(x, .7000000000000001, 0.8)
>   + (1.3 x - .4200000000000002) charfun2(x, .6000000000000001,
> .7000000000000001) + (1.1 x - 0.3) charfun2(x, 0.5, .6000000000000001)
>   + (.8999999999999998 x - .1999999999999999) charfun2(x, 0.4, 0.5)
>   + (.7000000000000002 x - .1200000000000001) charfun2(x, 0.3, 0.4)
>   + (0.5 x - 0.06) charfun2(x, 0.2, 0.3)
> (%i5) f(2);
> (%o5)                                 2.9
> (%i6) plot2d('(f(x)),[x,0,1]);
>
> Why does one need the apostrophe and the parentheses in the expression
> in (%i6), and what does it mean?

In Maxima 5.11 and earlier, a Boolean expression could only
evaluate to true or false, otherwise it would trigger an error.
e.g. when x is not yet assigned a value, if x > 0 then foo else bar
triggered an error.

The quote mark around f(x) is probably intended to prevent that error.
It doesn't appear to be needed in Maxima 5.12.0.
>From what I can tell, plot2d(f(x), ...) works OK.
(So does plot2d(f, ...), which also works in some, maybe all,
pre-5.12 versions.)

I guess the documentation can be updated to cut out the quote mark.

HTH
Robert