]> code.delx.au - gnu-emacs/blobdiff - lisp/calc/calcalg2.el
(ediff-diff-options): fixed the doc string
[gnu-emacs] / lisp / calc / calcalg2.el
index 849ec42c5f6c7fe2281ffb3a4cfbd1833e67f0d7..f71e58e223a67239f9d4ac67679a08b0022cb3b2 100644 (file)
@@ -1,7 +1,7 @@
 ;;; calcalg2.el --- more algebraic functions for Calc
 
 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
                        (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