[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calcalg2.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calcalg2.el [lexbind] |
Date: |
Thu, 11 Nov 2004 23:47:04 -0500 |
Index: emacs/lisp/calc/calcalg2.el
diff -c emacs/lisp/calc/calcalg2.el:1.5.4.2 emacs/lisp/calc/calcalg2.el:1.5.4.3
*** emacs/lisp/calc/calcalg2.el:1.5.4.2 Tue Oct 14 23:35:49 2003
--- emacs/lisp/calc/calcalg2.el Fri Nov 12 04:21:20 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,985 ****
;; 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))
;; If function has sines and cosines, try tan(x/2) substitution.
(and (let ((p (setq rat-in (math-expr-rational-in expr))))
--- 981,988 ----
;; Integration by substitution, for various likely sub-expressions.
;; (In first pass, we look only for sub-exprs that are linear in X.)
! (or (math-integ-try-linear-substitutions expr)
! (math-integ-try-substitutions expr)
;; If function has sines and cosines, try tan(x/2) substitution.
(and (let ((p (setq rat-in (math-expr-rational-in expr))))
***************
*** 1189,1194 ****
--- 1192,1198 ----
;;; 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) '^)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/calc/calcalg2.el [lexbind],
Miles Bader <=