limit lisp error



On Oct. 4, Edwin Woollett wrote:
-------------------------------
Is there a way to use limit.lisp from version
5.18.1 /src folder on top of 5.19.2 to get good
results from limit?

I tried putting a copy of 5.18.1 limit.lisp
in my work folder, and renaming it
limit5181.lisp and loading it in, but
with no effect:
.....
-----------------------------------------
The above message  used the fourie package rather than
focusing on the defects of limit.lisp directly, based
on Robert Dodier's comments of Oct. 1, 2009, when he  wrote:
-------------------------------------------------
Not a bug in fourier --- it appears to be due to this bug in limit.

(%i1) limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);
                          sin(%pi n)   %pi cos(%pi n)
(%o1)                     ---------- - --------------
                               2             n
                              n
(%i2) declare (n, integer);
(%o2)                                done
(%i3) limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);

*** - Lisp stack overflow. RESET

At this point I don't know anything else about it.
----------------------------------------------------------------

To clarify the issue again focus simply on the behavior of
limit.lisp.

First the present 5.19.2 behavior:
------------------
Maxima 5.19.2 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)

(%i2) limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);
(%o2) sin(%pi*n)/n^2-%pi*cos(%pi*n)/n
(%i3) declare (n,integer)$
(%i4) limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);
Maxima encountered a Lisp error:

 Error in MACSYMA-TOP-LEVEL [or a callee]: Bind stack overflow.

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
===================
Next the 5.18.1 behavior:

Maxima 5.18.1 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)

(%i1) display2d:false$
(%i2) limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);
(%o2) sin(%pi*n)/n^2-%pi*cos(%pi*n)/n
(%i3) declare (n,integer)$
(%i4) limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);
(%o4) -%pi*(-1)^n/n       (<---  what I want!! )
--------------------------------
Now we try to use 5.18.1's limit.lisp source code to redefine limit stuff
and override the supposedly defective 5.19.2 limit.lisp.
Again, I place the 5.18.1 source code in my work directory
and give it the name limit5181.lisp.
---------------------------------
(%i7) Maxima 5.19.2 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)

(%i1) display2d:false$
(%i2) load (limit5181);
(%o2) "c:/work3/limit5181.lisp"
(%i3) limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);
(%o3) sin(%pi*n)/n^2-%pi*cos(%pi*n)/n
(%i4) declare (n,integer)$
(%i5) limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);
Maxima encountered a Lisp error:

 Error in LET [or a callee]: Bind stack overflow.

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
----------------------------------------

* IF *  limit.lisp was the culprit in version 5.19.2, wouldn't we cure the
problem by loading in ver. 5.18.1's limit.lisp??

I have recently received a note from Peter K. Nicol (Aberdeen College)
who expresses some frustration at this problem which initially shows up
in using the fourie package. His note has two attachments, one a 96 Kb
pdf file showing wxmaxima behaviors, which was also sent to the mailing
list but I haven't seen it posted. Hence I pass on his message:
------------------------
Please see attached. As you will see I have, unfortunately, had the same
experience using wxMaxima. I have been using the fourie package on more
than 40 computers with about 100 engineering students and I would be
delighted if it could be fixed. (Of course the same problem is also
present on the portable version of wxMaxima)

All the best,

Peter

(Aberdeen College)
------------------------------------------------

On Oct. 4, Richard Hennessy wrote:
-----------------------
I do not delete old copies of Maxima.  I leave them in their folders so if
there is a bug in one version I can use an older version.  It is
inconvenient but it works.

Rich
--------------------------
Thanks, Rich. I too leave old versions of Maxima on my Windows computer, and
sometimes have several versions operating simultaneously. At present, I have
fifteen versions ready to run. I would suggest that folks who need to use 
the
fourie package simply run ver. 5.18.1.

Ted Woollett