[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101958: calc-alg.el (math-var): Rena
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101958: calc-alg.el (math-var): Renamed from `var'. |
Date: |
Wed, 13 Oct 2010 22:14:38 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101958
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Wed 2010-10-13 22:14:38 -0500
message:
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'.
modified:
lisp/ChangeLog
lisp/calc/calc-alg.el
lisp/calc/calcalg2.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-10-13 23:43:39 +0000
+++ b/lisp/ChangeLog 2010-10-14 03:14:38 +0000
@@ -1,3 +1,13 @@
+2010-10-14 Jay Belanger <address@hidden>
+
+ * calc/calc-alg.el (math-var): Renamed from `var'.
+ (math-is-polynomial, math-is-poly-rec): Replace `var'
+ with `math-var'.
+
+ * calc/calcalg2.el (math-var): Renamed from `var'.
+ (calcFunc-table, math-scan-for-limits): Replace `var'
+ with `math-var'.
+
2010-10-13 Glenn Morris <address@hidden>
* subr.el (last): Deal with dotted lists (reported in bug#7174).
=== modified file 'lisp/calc/calc-alg.el'
--- a/lisp/calc/calc-alg.el 2010-01-13 08:35:10 +0000
+++ b/lisp/calc/calc-alg.el 2010-10-14 03:14:38 +0000
@@ -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)))))
=== modified file 'lisp/calc/calcalg2.el'
--- a/lisp/calc/calcalg2.el 2010-02-28 01:22:44 +0000
+++ b/lisp/calc/calcalg2.el 2010-10-14 03:14:38 +0000
@@ -1886,9 +1886,9 @@
;; math-scan-for-limits.
(defvar calc-low)
(defvar calc-high)
-(defvar var)
+(defvar math-var)
-(defun calcFunc-table (expr var &optional calc-low calc-high step)
+(defun calcFunc-table (expr math-var &optional calc-low calc-high step)
(or calc-low
(setq calc-low '(neg (var inf var-inf)) calc-high '(var inf var-inf)))
(or calc-high (setq calc-high calc-low calc-low 1))
@@ -1917,7 +1917,7 @@
(math-working-step-2 (1+ count))
(math-working-step 0))
(setq expr (math-evaluate-expr
- (math-expr-subst expr var '(var DUMMY var-DUMMY))))
+ (math-expr-subst expr math-var '(var DUMMY var-DUMMY))))
(while (>= count 0)
(setq math-working-step (1+ math-working-step)
var-DUMMY calc-low
@@ -1940,7 +1940,7 @@
(calc-record-why 'integerp calc-high))
(calc-record-why 'integerp calc-low)))
(append (list (or math-tabulate-function 'calcFunc-table)
- expr var)
+ expr math-var)
(and (not (and (equal calc-low '(neg (var inf var-inf)))
(equal calc-high '(var inf var-inf))))
(list calc-low calc-high))
@@ -1950,11 +1950,11 @@
(cond ((Math-primp x))
((and (eq (car x) 'calcFunc-subscr)
(Math-vectorp (nth 1 x))
- (math-expr-contains (nth 2 x) var))
+ (math-expr-contains (nth 2 x) math-var))
(let* ((calc-next-why nil)
- (low-val (math-solve-for (nth 2 x) 1 var nil))
+ (low-val (math-solve-for (nth 2 x) 1 math-var nil))
(high-val (math-solve-for (nth 2 x) (1- (length (nth 1 x)))
- var nil))
+ math-var nil))
temp)
(and low-val (math-realp low-val)
high-val (math-realp high-val))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101958: calc-alg.el (math-var): Renamed from `var'.,
Jay Belanger <=