having trouble with flet in plot.lisp -- stack overflow
Subject: having trouble with flet in plot.lisp -- stack overflow
From: Raymond Toy
Date: Thu, 03 Nov 2005 10:18:44 -0500
>>>>> "Robert" == Robert Dodier writes:
Robert> Hello,
Robert> Trying make a plot such as plot2d (x, [x, 0, 1]),
Robert> I am getting a stack overflow in DRAW2D (src/plot.lisp)
Robert> in current cvs Maxima with SBCL and Clisp.
Robert> The same code is OK with GCL, however.
Robert> In SBCL a backtrace shows ((FLET FUN) 0.025d0) over and over.
Robert> I guess that's originating from line 910 in src/plot.lisp,
Yuck. I can reproduce this with clisp. But cmucl handles it just
fine.
Robert> (flet ((fun (x)
Robert> (if log-x-p
Robert> (funcall f (exp x))
Robert> (funcall f x))))
I don't really see anything wrong with this. Can you provide any
additional info from sbcl? I don't see how ((flet fun) 0.025d0) can
be on the backtrace over and over. It's not a recursive function (or
shouldn't be).
BTW, I see that we still have deficiencies in log plotting.
plot2d(x,[x,0,1],[logy,t]) doesn't produce a very nice plot because
there are too few samples near x = 0.
Ray