;;; 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