[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc-arith.el
From: |
Colin Walters |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc-arith.el |
Date: |
Mon, 19 Nov 2001 02:31:53 -0500 |
Index: emacs/lisp/calc/calc-arith.el
diff -u emacs/lisp/calc/calc-arith.el:1.2 emacs/lisp/calc/calc-arith.el:1.3
--- emacs/lisp/calc/calc-arith.el:1.2 Wed Nov 14 04:01:07 2001
+++ emacs/lisp/calc/calc-arith.el Mon Nov 19 02:31:52 2001
@@ -1,7 +1,10 @@
-;; Calculator for GNU Emacs, part II [calc-arith.el]
+;;; calc-arith.el --- arithmetic functions for Calc
+
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
-;; Written by Dave Gillespie, address@hidden
+;; Author: David Gillespie <address@hidden>
+;; Maintainer: Colin Walters <address@hidden>
+
;; This file is part of GNU Emacs.
;; GNU Emacs is distributed in the hope that it will be useful,
@@ -19,7 +22,9 @@
;; file named COPYING. Among other things, the copyright notice
;; and this notice must be preserved on all copies.
+;;; Commentary:
+;;; Code:
;; This file is autoloaded from calc-ext.el.
(require 'calc-ext)
@@ -148,9 +153,9 @@
;;;; Declarations.
-(setq math-decls-cache-tag nil)
-(setq math-decls-cache nil)
-(setq math-decls-all nil)
+(defvar math-decls-cache-tag nil)
+(defvar math-decls-cache nil)
+(defvar math-decls-all nil)
;;; Math-decls-cache is an a-list where each entry is a list of the form:
;;; (VAR TYPES RANGE)
@@ -880,7 +885,7 @@
;;;; Arithmetic.
-(defun calcFunc-neg (a)
+(defsubst calcFunc-neg (a)
(math-normalize (list 'neg a)))
(defun math-neg-fancy (a)
@@ -2351,7 +2356,7 @@
a
(math-float (math-ceiling a prec))))
-(setq math-rounding-mode nil)
+(defvar math-rounding-mode nil)
;;; Coerce A to be an integer (by rounding to nearest integer). [I N] [Public]
(defun math-round (a &optional prec)
@@ -2620,6 +2625,8 @@
(math-normalize (list '+ a b))
(math-add a b)))
+(defvar math-combine-prod-e '(var e var-e))
+
;;; The following is expanded out four ways for speed.
(defun math-combine-prod (a b inva invb scalar-okay)
(cond
@@ -2734,7 +2741,6 @@
(condition-case err
(math-pow a apow)
(inexact-result (list '^ a apow)))))))))))
-(setq math-combine-prod-e '(var e var-e))
(defun math-mul-or-div (a b ainv binv)
(if (or (Math-vectorp a) (Math-vectorp b))