emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calc/calcalg2.el


From: Jay Belanger
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calcalg2.el
Date: Sun, 07 Nov 2004 18:40:31 -0500

Index: emacs/lisp/calc/calcalg2.el
diff -c emacs/lisp/calc/calcalg2.el:1.8 emacs/lisp/calc/calcalg2.el:1.9
*** emacs/lisp/calc/calcalg2.el:1.8     Mon Sep  1 15:45:19 2003
--- emacs/lisp/calc/calcalg2.el Sun Nov  7 23:33:29 2004
***************
*** 738,745 ****
                        (setcar (cdr cur-record) 'cancelled)))
               (math-replace-integral-parts (car expr)))))))
  
  (defun math-do-integral (expr)
!   (let (t1 t2)
      (or (cond ((not (math-expr-contains expr math-integ-var))
               (math-mul expr math-integ-var))
              ((equal expr math-integ-var)
--- 738,749 ----
                        (setcar (cdr cur-record) 'cancelled)))
               (math-replace-integral-parts (car expr)))))))
  
+ (defvar math-linear-subst-tried t
+   "Non-nil means that a linear substitution has been tried.")
+ 
  (defun math-do-integral (expr)
!   (let ((math-linear-subst-tried nil)
!         t1 t2)
      (or (cond ((not (math-expr-contains expr math-integ-var))
               (math-mul expr math-integ-var))
              ((equal expr math-integ-var)
***************
*** 977,983 ****
  
      ;; Integration by substitution, for various likely sub-expressions.
      ;; (In first pass, we look only for sub-exprs that are linear in X.)
!     (or (if math-enable-subst
            (math-integ-try-substitutions expr)
          (math-integ-try-linear-substitutions expr))
  
--- 981,987 ----
  
      ;; Integration by substitution, for various likely sub-expressions.
      ;; (In first pass, we look only for sub-exprs that are linear in X.)
!     (or (if math-linear-subst-tried
            (math-integ-try-substitutions expr)
          (math-integ-try-linear-substitutions expr))
  
***************
*** 1189,1194 ****
--- 1193,1199 ----
  
  ;;; Look for substitutions of the form u = a x + b.
  (defun math-integ-try-linear-substitutions (sub-expr)
+   (setq math-linear-subst-tried t)
    (and (not (Math-primp sub-expr))
         (or (and (not (memq (car sub-expr) '(+ - * / neg)))
                (not (and (eq (car sub-expr) '^)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]