From 2fc25267ddad9ecfc57d4aee97fe4c1da32e38a0 Mon Sep 17 00:00:00 2001 From: Raymond Toy Date: Sat, 29 Jun 2024 07:27:41 -0700 Subject: [PATCH] Rename *ll* and *ul* to ll and ul in defint `defint` no longer really needs the special vars. Rename them so we use lexical vars instead. Full testsuite + share passes with cmucl and ccl64, except for the current known failure in problem 237 in rtestint. --- src/defint.lisp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/defint.lisp b/src/defint.lisp index 434c51d29..47525f669 100644 --- a/src/defint.lisp +++ b/src/defint.lisp @@ -416,36 +416,36 @@ in the interval of integration.") (m* (sdiff d newvar) (subst d ivar exp))) -(defun defint (exp ivar *ll* *ul*) +(defun defint (exp ivar ll ul) (let ((old-assumptions *defint-assumptions*) (*current-assumptions* ()) (limitp t)) (unwind-protect (prog () - (multiple-value-setq (*current-assumptions* *ll* *ul*) - (make-defint-assumptions 'noask ivar *ll* *ul*)) + (multiple-value-setq (*current-assumptions* ll ul) + (make-defint-assumptions 'noask ivar ll ul)) #+nil - (format t "new limits ~A ~A~%" *ll* *ul*) + (format t "new limits ~A ~A~%" ll ul) (let ((exp (resimplify exp)) (ivar (resimplify ivar)) ($exptsubst t) (*loopstop* 0) ;; D (not used? -- cwh) ans nn* dn* $noprincipal) - (cond ((setq ans (defint-list exp ivar *ll* *ul*)) + (cond ((setq ans (defint-list exp ivar ll ul)) (return ans)) ((or (zerop1 exp) - (alike1 *ul* *ll*)) + (alike1 ul ll)) (return 0.)) ((not (among ivar exp)) - (cond ((or (member *ul* '($inf $minf) :test #'eq) - (member *ll* '($inf $minf) :test #'eq)) + (cond ((or (member ul '($inf $minf) :test #'eq) + (member ll '($inf $minf) :test #'eq)) (diverg)) - (t (setq ans (m* exp (m+ *ul* (m- *ll*)))) + (t (setq ans (m* exp (m+ ul (m- ll)))) (return ans)))) ;; Look for integrals which involve log and exp functions. ;; Maxima has a special algorithm to get general results. - ((and (setq ans (defint-log-exp exp ivar *ll* *ul*))) + ((and (setq ans (defint-log-exp exp ivar ll ul))) (return ans))) (let* ((exp (rmconst1 exp ivar)) (c (car exp)) @@ -467,11 +467,11 @@ in the interval of integration.") ;; Well, there's at least one existing result which requires ;; logabs = true in RISCHINT, so try to make a minimal change here instead. (cond ((setq ans (let ($logabs) (antideriv exp ivar))) - (setq ans (intsubs ans *ll* *ul* ivar)) + (setq ans (intsubs ans ll ul ivar)) (return (cond (ans (m* c ans)) (t nil)))) (t (return nil))))) (setq exp (tansc-var exp ivar)) - (cond ((setq ans (initial-analysis exp ivar *ll* *ul*)) + (cond ((setq ans (initial-analysis exp ivar ll ul)) (return (m* c ans)))) (return nil)))) (restore-defint-assumptions old-assumptions *current-assumptions*)))) -- 2.11.4.GIT