(calcFunc-grade, calcFunc-rgrade, math-grade-beforep): Replace
variable grade-vec by declared variable.
(math-rb-close): New variable.
(math-read-brackets, math-read-vector): Replace variable close by
declared variable.
(calc-num-units, calc-den-units): New variables.
(calc-explain-units, calc-explain-units-rec): Replace variables
num-units and den-units by declared variables.
(math-cu-unit-list): New variable.
(math-build-units-table, math-compare-unit-names)
(math-convert-units, math-convert-units-rec): Replace variable
unit-list by declared variable.
(math-fbu-base, math-fbu-entry): New variables.
(math-find-base-units, math-find-base-units-rec): Replace variables
base and entry by declared variables.
(math-which-standard): New variable.
(math-to-standard-units, math-to-standard-rec): Replace variable
which-standard by declared variable.
(math-fcu-u): New variable.
(math-find-compatible-unit, math-find-compatible-unit-rec):
Replace variable u by declared variable.
(math-cu-new-units, math-cu-pure): New variables.
(math-convert-units, math-convert-units-rec): Replace variables
new-units and pure by declared variables.
(math-try-cancel-units): New variable.
(math-simplify-units-quotient): Replace variable try-cancel-units by
declared variable.
(math-polynomial-p1): Replace variable mpb-top-expr by declared
variable.
(math-poly-base-total-base): New variable.
(math-total-polynomial-base, math-polynomial-p1): Replace variable
mpb-total-base by declared variable.
(math-factored-vars, math-to-list): Declare it.
(math-fact-expr): New variable.
(calcFunc-factors, calcFunc-factor, math-factor-expr,
math-factor-expr-try, math-factor-expr-part): Replace variable expr by
declared variable.
(math-fet-x): New variable.
(math-factor-expr-try, math-factor-poly-coefs): Replace variable x by
declared variable.
(math-factor-poly-coefs): Make temp a local variable.
(math-nth-root-float, math-nth-root-float-iter): Replace variables
n, nf and nfm1 by declared variables.
(math-nri-n): New variable.
(math-nth-root-int, math-nth-root-int-iter): Replace variable n by
declared variable.
(calcFunc-log): Removed misplaced condition.
math-read-big-lines.
(math-read-big-expr): Replace variables the-baseline, the-h2
and err-msg by math-read-big-baseline, math-read-big-h2 and
math-read-err-msg.
(math-read-big-bigp): Replace variable h2 with math-rb-h2.
(calc-curve-coefnames): New variable.
(calc-curve-fit, calc-get-fit-variables): Replace variables nvars,
varnames, model and coefnames by declared variables.
(math-root-widen): New variable.
(math-search-root, math-find-root): Replace variable root-widen by
declared variable.
(var-DUMMY): Declare it.
(math-root-vars, math-min-vars): Move the declarations to earlier in
the file.
(math-brent-min): Make d a local variable.
(math-find-minimum): Replace non-existent variable.
(math-ninteg-romberg): Remove unnecessary variable.
(math-ninteg-temp): New variable.
(math-ninteg-romberg, math-ninteg-midpoint): Replace variable
integ-temp by declared variable.
(math-fit-first-var, math-fit-first-coef, math-fit-new-coefs): New variables.
(math-general-fit): Replace variables first-var, first-coef and
new-coefs by declared variables.
(calcFunc-fitvar): Replace variable first-var by declared variable.
(calcFunc-fitparam): Replace variable first-coef by declared variable.
(calcFunc-fitdummy): Replace variable new-coefs by declared variable.
(math-all-vars-vars, math-all-vars-found): New variables.
(math-all-vars-in, math-all-vars-rec): Replace variables vars and
found by declared variable math-all-vars-vars.
file.
(calc-selection-cache-num, calc-selection-cache-comp)
(calc-selection-cache-offset, calc-selection-true-num)
(calc-final-point-line, calc-final-point-column)
(calc-original-buffer): Declare them.
(calc-fnp-op, calc-fnp-num): New variables.
(calc-find-nth-part, calc-find-nth-part-rec)
(calc-select-previous): Replace op and num by declared variables.
(calc-rsf-old, calc-rsf-new): New variables.
(calc-replace-sub-formula, calc-replace-sub-formula-rec):
Replace variables old and new by declared variables.
(calc-sel-reselect): New variable.
(calc-auto-selection, calc-enter-selection, calc-edit-selection)
(calc-sel-evaluate, calc-sel-expand-formula, calc-sel-expand-formula)
(calc-sel-mult-both-sides, calc-sel-add-both-sides): Replace variable
reselect with declared variable.
(calc-edit-disp-trail): Declare it.
(calc-finish-selection-edit): Replace variable disp-trail by declared
variable.
Replaced argument expr in all calls of math-defsimplify by
math-simplify-expr.
(math-simplify-units-prod): Replaced variable expr by declared
variable math-simplify-expr.
(math-eval-rules-cache, math-eval-rules-cache-other): Declared them.
(math-top-only): New variable
(math-simplify, math-simplify-step): Replace variable top-only by
declared variable math-top-only.
(math-simplify-expr): Declared it.
Replaced argument expr in all calls of math-defsimplify by
math-simplify-expr.
(math-simplify-plus, math-simplify-times, math-simplify-divide)
(math-simplify-divisor, math-simplify-one-divisor)
(math-simplify-mod, math-simplify-ineq, math-simplify-sqrt)
(math-simplify-pow): Replaced variable expr by declared variable
math-simplify-expr.
(math-simplify-divisor): Removed local variables temp and op.
(math-simplify-one-divisor): Made temp and op local variables.
(math-simplify-divisor-nover, math-simplify-divisor-dover): New
variables.
(math-simplify-divisor, math-simplify-one-divisor): Use declared
variables.
(math-expr-subst-new, math-expr-subst-old): New variables.
(math-expr-subst, math-expr-subst-rec): Use declared variables.
(math-is-poly-degree, math-is-poly-loose): New variables.
(math-is-polynomial, math-is-poly-rec): Use declared variables.
(math-poly-base-const-ok, math-poly-base-pred): New variables.
(math-polynomial-base, math-polynomial-base-rec): Use declared
variables.
(calcFunc-dfac): Replaced max by n.
(math-stirling-local-cache): New variable.
(math-stirling-number, math-stirling-1, math-stirling-2): Replaced
the variable `cache' by the declared variable math-stirling-local-cache.
(var-RandSeed): Declared it.
(math-init-random-base, math-random-digit): Don't check to see if
var-RandSeed is bound.
(math-random-cache, math-gaussian-cache, calc-verbose-nextprime):
Declared them instead of just setting them.
(math-init-random-base): Made i a local variable.
(math-random-digit): Made math-random-last a local variable.
(math-prime-test-cache): Moved declaration to before it is used.
(math-prime-test-cache-k, math-prime-test-cache-q,
math-prime-test-cache-nm1, math-prime-factors-finished): Declared
them as variables.