plotting numeric functions



On 5/24/10, Leo Butler <l.butler at ed.ac.uk> wrote:

> I suspect that the issue is GCL.

Well, let's not be hasty here. After trying the example function a
few times, I'm pretty sure the problem is that abs tries to construct
an enormous expression for f(nr, ni) when nr and ni are symbols.
(If we can ensure that abs(f(nr, ni)) is evaluated only after nr and ni
are bound to numbers, all is well.)

It appears that plot3d evaluates its argument at least once before
binding nr and ni to numbers, hence plot3d fails; I'm inclined to
think that's a bug.

Here's yet another idea: let g(x, y) := if numberp(x) and numberp(y)
then f(x, y) else 'g(x, y) and then try plot3d(abs(g(x, y)), ...).
Is that any improvement?

HTH

Robert Dodier