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 12:13:44 -0500
>>>>> "Robert" == Robert Dodier writes:
Robert> (flet ((fun (x)
Robert> (if log-x-p
Robert> (funcall f (exp x))
Robert> (funcall f x))))
Robert> Not sure what's going on here -- could be I'm too tired
Robert> to consider this rationally ... Any information would be great.
Oops. I didn't answer this. To support logarithmic plotting (of the
x axis), we replace the original function f with a new function fun.
When doing log plotting of the x axis, we sample the x axis
logarithmically by converting the x samples to log(x) samples. To
compute the corresponding y value, we need to compute f(exp(x)). This
is what the flet fun is for.
How this can cause a stack overflow with clisp and sbcl confuses me.
Ray