Plotting singular functions



> > 4) Print an error message and stop.
> I now think we should choose (4). Here is my reasoning:

> 1) Plotting functions with singularities is difficult.

Yes.  Even plotting functions without singularities isn't trivial.  By
the way, I think we are really talking not only about true
singularities, but also simple evaluation errors.

> 2) Research has been done on this problem, so it doesn't make 
> sense to implement some half-baked impromptu solution.

I generally agree, but I would rather get something rather than nothing.
Since we need a quick solution right now, I would suggest replacing the
singular point with 0.0 and giving a warning.  Just one warning, after
all the evaluations are done, e.g.

  Errors in evaluating function being plotted.
  Substituted 0.0 for error values.

Even better to say something useful about the error points:

  Errors in evaluating function being plotted.
  Of 12345 function evaluations, 7 had errors.
  First five erroneous points: (0.0,1.23456), (0.0,1.7654), ...  
  Substituted 0.0 for error values.

The reason I suggest substituting 0 rather than inf is that errors
aren't necessarily poles.  They may be removable singularities (e.g.
(exp(x)-exp(-x))/x at x=0), undefined points (e.g. sin(1/x) at x=0),
etc.  Substituting 0 is less likely to screw up the y axis limits.

       -s