diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2010-10-13 22:14:38 -0500 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2010-10-13 22:14:38 -0500 |
commit | a974dcf2bba7eb9e3f4a407cc2ff1b714e6e7d2f (patch) | |
tree | c90716599a3332d0f483bd0ca5e68ed4025fe8c2 /lisp/calc/calc-alg.el | |
parent | 24f981c9f4e15f42d4b569919297c4781a6fc51d (diff) | |
download | emacs-a974dcf2bba7eb9e3f4a407cc2ff1b714e6e7d2f.tar.gz |
calc-alg.el (math-var): Renamed from `var'.
(math-is-polynomial, math-is-poly-rec): Replace `var' with `math-var'.
calcalg2.el (math-var): Renamed from `var'.
(calcFunc-table, math-scan-for-limits): Replace `var' with `math-var'.
Diffstat (limited to 'lisp/calc/calc-alg.el')
-rw-r--r-- | lisp/calc/calc-alg.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index 6a85be14aeb..47cdae52a13 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el @@ -1659,11 +1659,11 @@ ;; math-is-poly-rec. (defvar math-is-poly-degree) (defvar math-is-poly-loose) -(defvar var) +(defvar math-var) -(defun math-is-polynomial (expr var &optional math-is-poly-degree math-is-poly-loose) +(defun math-is-polynomial (expr math-var &optional math-is-poly-degree math-is-poly-loose) (let* ((math-poly-base-variable (if math-is-poly-loose - (if (eq math-is-poly-loose 'gen) var '(var XXX XXX)) + (if (eq math-is-poly-loose 'gen) math-var '(var XXX XXX)) math-poly-base-variable)) (poly (math-is-poly-rec expr math-poly-neg-powers))) (and (or (null math-is-poly-degree) @@ -1672,11 +1672,11 @@ (defun math-is-poly-rec (expr negpow) (math-poly-simplify - (or (cond ((or (equal expr var) + (or (cond ((or (equal expr math-var) (eq (car-safe expr) '^)) (let ((pow 1) (expr expr)) - (or (equal expr var) + (or (equal expr math-var) (setq pow (nth 2 expr) expr (nth 1 expr))) (or (eq math-poly-mult-powers 1) @@ -1690,7 +1690,7 @@ (equal math-poly-mult-powers (nth 1 m)) (setq math-poly-mult-powers (nth 1 m))) - (or (equal expr var) + (or (equal expr math-var) (eq math-poly-mult-powers 1)) (car m))))) (if (consp pow) @@ -1698,7 +1698,7 @@ (setq pow (math-to-simple-fraction pow)) (and (eq (car-safe pow) 'frac) math-poly-frac-powers - (equal expr var) + (equal expr math-var) (setq math-poly-frac-powers (calcFunc-lcm math-poly-frac-powers (nth 2 pow)))))) @@ -1706,10 +1706,10 @@ (setq pow (math-mul pow math-poly-frac-powers))) (if (integerp pow) (if (and (= pow 1) - (equal expr var)) + (equal expr math-var)) (list 0 1) (if (natnump pow) - (let ((p1 (if (equal expr var) + (let ((p1 (if (equal expr math-var) (list 0 1) (math-is-poly-rec expr nil))) (n pow) @@ -1749,7 +1749,7 @@ math-is-poly-degree)) (math-poly-mul p1 p2)))))) ((eq (car expr) '/) - (and (or (not (math-poly-depends (nth 2 expr) var)) + (and (or (not (math-poly-depends (nth 2 expr) math-var)) (and negpow (math-is-poly-rec (nth 2 expr) nil) (setq math-poly-neg-powers @@ -1759,13 +1759,13 @@ (mapcar (function (lambda (x) (math-div x (nth 2 expr)))) p1)))) ((and (eq (car expr) 'calcFunc-exp) - (equal var '(var e var-e))) - (math-is-poly-rec (list '^ var (nth 1 expr)) negpow)) + (equal math-var '(var e var-e))) + (math-is-poly-rec (list '^ math-var (nth 1 expr)) negpow)) ((and (eq (car expr) 'calcFunc-sqrt) math-poly-frac-powers) (math-is-poly-rec (list '^ (nth 1 expr) '(frac 1 2)) negpow)) (t nil)) - (and (or (not (math-poly-depends expr var)) + (and (or (not (math-poly-depends expr math-var)) math-is-poly-loose) (not (eq (car expr) 'vec)) (list expr))))) |