plotting numeric functions




On Mon, 24 May 2010, Robert Dodier wrote:

< 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?
 
Based on a trace of g, it appears that this puts plot3d into an infinite
loop. I'm inclined to think that there are at least 2 issues here.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.