summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>1999-12-18 16:36:31 +0000
committerDave Love <fx@gnu.org>1999-12-18 16:36:31 +0000
commit35079221bbdc876d52777be254f5262c7cdc713d (patch)
tree38255c31ce9bf94f9d53c7f5d2971016a7b002cb /lisp/emacs-lisp
parent94c79e1040d39bdf1a322528b3989d9216611c5d (diff)
downloademacs-35079221bbdc876d52777be254f5262c7cdc713d.tar.gz
emacs-35079221bbdc876d52777be254f5262c7cdc713d.tar.bz2
emacs-35079221bbdc876d52777be254f5262c7cdc713d.zip
Bind free variables.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/float.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/float.el b/lisp/emacs-lisp/float.el
index 2fad3fcfe92..69cfa251c89 100644
--- a/lisp/emacs-lisp/float.el
+++ b/lisp/emacs-lisp/float.el
@@ -96,16 +96,16 @@
"Masks all bits except the highest-order magnitude bit")
;; various useful floating point constants
-(setq _f0 '(0 . 1))
+(defconst _f0 '(0 . 1))
-(setq _f1/2 '(4194304 . -23))
+(defconst _f1/2 '(4194304 . -23))
-(setq _f1 '(4194304 . -22))
+(defconst _f1 '(4194304 . -22))
-(setq _f10 '(5242880 . -19))
+(defconst _f10 '(5242880 . -19))
;; support for decimal conversion routines
-(setq powers-of-10 (make-vector (1+ decimal-digits) _f1))
+(defvar powers-of-10 (make-vector (1+ decimal-digits) _f1))
(aset powers-of-10 1 _f10)
(aset powers-of-10 2 '(6553600 . -16))
(aset powers-of-10 3 '(8192000 . -13))
@@ -113,8 +113,8 @@
(aset powers-of-10 5 '(6400000 . -6))
(aset powers-of-10 6 '(8000000 . -3))
-(setq all-decimal-digs-minval (aref powers-of-10 (1- decimal-digits))
- highest-power-of-10 (aref powers-of-10 decimal-digits))
+(defconst all-decimal-digs-minval (aref powers-of-10 (1- decimal-digits)))
+(defconst highest-power-of-10 (aref powers-of-10 decimal-digits))
(defun fashl (fnum) ; floating-point arithmetic shift left
(cons (ash (car fnum) 1) (1- (cdr fnum))))
@@ -150,10 +150,10 @@
(error "")))
;; support for the multiplication function
-(setq halfword-bits (/ mantissa-bits 2) ; bits in a halfword
- masklo (1- (ash 1 halfword-bits)) ; isolate the lower halfword
- maskhi (lognot masklo) ; isolate the upper halfword
- round-limit (ash 1 (/ halfword-bits 2)))
+(defconst halfword-bits (/ mantissa-bits 2)) ; bits in a halfword
+(defconst masklo (1- (ash 1 halfword-bits))) ; isolate the lower halfword
+(defconst maskhi (lognot masklo)) ; isolate the upper halfword
+(defconst round-limit (ash 1 (/ halfword-bits 2)))
(defun hihalf (n) ; return high halfword, shifted down
(ash (logand n maskhi) (- halfword-bits)))