plot2d



> (C1) f(x) := if (x < 0) then -x^2 else x^2$
> (C2) plot2d(f(x),[x,-5,5]); 
> MACSYMA was unable to evaluate the predicate: 
> x < 0 
> #0: f(x=x) 

This is happening because plot2d is an ordinary function (not an
mfexpr), and so evaluates its arguments before it does anything else.
This is useful so you can say things like plot2d(d44, ...).  To avoid
this problem, quote the first argument:

  plot2d('(f(x)),[x,-5,5] )

The function can be compiled without any problem.

As for:

>  plot2d(f, [-5,5]); 

Yes, that's certainly possible.  Though frankly I'd prefer to keep
things simple.

> Additionally, I agree with Felix; we should have an option that 
> (optionally) clips a graph vertically near poles. 

I agree.  I think we should be able to develop some reasonable heuristic
about this.  We should also handle errors in some reasonable way.

     -s