Subject: depends and diff with ver 5.22.1 batch file
From: Edwin Woollett
Date: Tue, 12 Oct 2010 15:42:41 -0700
On Oct. 12, 2010, Dieter Kaiser wrote:
-----------------------
The problem of version Maxima 5.22 is, that I have overseen, that the
old code does not look into indirect dependencies. I have specialized
the code to remove the behavior that any dependency causes that a symbol
depends on any other symbol too. But I have not generalized the code to
look into indirect dependencies.
Meanwhile this has been corrected too. The correction is part of Maxima
5.22post. You can load the following patch to get a correct function
depends:
(defun depends (e x &aux l)
(setq e (specrepcheck e))
(cond ((alike1 e x) t)
((mnump e) nil)
((and (symbolp e) (setq l (mget e 'depends)))
;; Go recursively through the list of dependencies.
;; This code detects indirect dependencies like a(x) and x(t).
(dependsl l x))
((atom e) nil)
(t (or (depends (caar e) x)
(dependsl (cdr e) x)))))
Please, try it.
--------------------------------------------------
Hi Dieter,
This patch cures the problem in both depends.mac
and sphere.mac using 5.22.1.
Thanks for the cure. Until a new version of Maxima
comes out, I will post a version caution with my
ch. 6 files.
-------------------------
(%i3) Maxima 5.22.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
(%i1) load("depends-new.lisp");
(%o1) depends-new.lisp
(%i2) batch("depends.mac")$
read and interpret file: #pC:/work5/depends.mac
(%i3) display2d : false
(%i4) "spherical polar coordinates (r,theta,phi ) = (r,t,p) "
(%i5) assume(r > 0,sin(t) > 0)
etc., etc.,
--------------------------
Ted