On 4/4/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> The number 1.0e308 seems to represent "missing value" for plot2d. (I
> noticed this when trying to work with infinity; see above.) This is a
> very unmaximalike convention. Wouldn't it be better to use UND or
> something for this?
What is the behavior that makes it appear that missing = 1e308?
I don't remember seeing that in plot.lisp.
> but these are no-ops (no plot appears at all):
>
> plot2d('( if x<1 or x>2 then sin(x) else 'und), [x,0,3]);
> plot2d( lambda([x],if x<1 or x>2 then sin(x) else 'und), [x,0,3]);
Maxima makes a title for Gnuplot via stringout(expr) and the
presence of the single quote confuses Gnuplot. Probably any
generated strings should be quoted or sanitized somehow.
This isn't an evaluation problem to the best of my knowledge.
plot2d(<stuff above>, [plot_format, openmath]) should be OK.
Also plot2d(<stuff> else und), [x, 0, 3]) i.e. Gnuplot format but
this time with no single quote appearing in the expression,
should be OK. Let me know if it's not.
That said, there is a bit of related plot2d strangeness you might
encounter. The current heuristic (iirc) treats nonnumeric values
like this: if the nonnumeric value is NIL (false), treat the function
as undefined there; otherwise, subdivide the plotting interval and
reevaluate the expression, in hopes of finding some numeric
values. The subdivide & reevaluate strategy was presumably
arranged for isolated singularities.
FWIW
Robert