From: Jay Belanger Date: Tue, 14 Feb 2006 21:39:26 +0000 (+0000) Subject: (math-integrate-by-parts): Do a more careful test to see if equation X-Git-Tag: emacs-pretest-22.0.90~4130 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=63f7edace755ddb71ba842b55bafa98e55a2e768;p=emacs.git (math-integrate-by-parts): Do a more careful test to see if equation can be solved. --- diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index facb691c08b..f71e58e223a 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -1253,9 +1253,11 @@ (calcFunc-expand temp) (setq v (list 'var 'PARTS math-cur-record) temp (let (calc-next-why) - (math-solve-for (math-sub v temp) 0 v nil))) - (and temp (not (integerp temp)) - (math-simplify-extended temp))))) + (math-simplify-extended + (math-solve-for (math-sub v temp) 0 v nil))) + temp (if (and (eq (car-safe temp) '/) + (math-zerop (nth 2 temp))) + nil temp))))) (setcar (cdr math-cur-record) 'busy))))) ;;; This tries two different formulations, hoping the algebraic simplifier