# HG changeset patch # User Jay Belanger # Date 1139953166 0 # Node ID da69cee7c84c186e9d738229e170b8284b2b9cc0 # Parent ab08676bc819f40ff02408038d7ea003a21a40ba (math-integrate-by-parts): Do a more careful test to see if equation can be solved. diff -r ab08676bc819 -r da69cee7c84c lisp/calc/calcalg2.el --- a/lisp/calc/calcalg2.el Tue Feb 14 21:38:57 2006 +0000 +++ b/lisp/calc/calcalg2.el Tue Feb 14 21:39:26 2006 +0000 @@ -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