diff options
| author | Dave Love | 1999-12-18 16:36:31 +0000 |
|---|---|---|
| committer | Dave Love | 1999-12-18 16:36:31 +0000 |
| commit | 35079221bbdc876d52777be254f5262c7cdc713d (patch) | |
| tree | 38255c31ce9bf94f9d53c7f5d2971016a7b002cb | |
| parent | 94c79e1040d39bdf1a322528b3989d9216611c5d (diff) | |
| download | emacs-35079221bbdc876d52777be254f5262c7cdc713d.tar.gz emacs-35079221bbdc876d52777be254f5262c7cdc713d.zip | |
Bind free variables.
| -rw-r--r-- | lisp/emacs-lisp/float.el | 22 |
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 @@ | |||
| 96 | "Masks all bits except the highest-order magnitude bit") | 96 | "Masks all bits except the highest-order magnitude bit") |
| 97 | 97 | ||
| 98 | ;; various useful floating point constants | 98 | ;; various useful floating point constants |
| 99 | (setq _f0 '(0 . 1)) | 99 | (defconst _f0 '(0 . 1)) |
| 100 | 100 | ||
| 101 | (setq _f1/2 '(4194304 . -23)) | 101 | (defconst _f1/2 '(4194304 . -23)) |
| 102 | 102 | ||
| 103 | (setq _f1 '(4194304 . -22)) | 103 | (defconst _f1 '(4194304 . -22)) |
| 104 | 104 | ||
| 105 | (setq _f10 '(5242880 . -19)) | 105 | (defconst _f10 '(5242880 . -19)) |
| 106 | 106 | ||
| 107 | ;; support for decimal conversion routines | 107 | ;; support for decimal conversion routines |
| 108 | (setq powers-of-10 (make-vector (1+ decimal-digits) _f1)) | 108 | (defvar powers-of-10 (make-vector (1+ decimal-digits) _f1)) |
| 109 | (aset powers-of-10 1 _f10) | 109 | (aset powers-of-10 1 _f10) |
| 110 | (aset powers-of-10 2 '(6553600 . -16)) | 110 | (aset powers-of-10 2 '(6553600 . -16)) |
| 111 | (aset powers-of-10 3 '(8192000 . -13)) | 111 | (aset powers-of-10 3 '(8192000 . -13)) |
| @@ -113,8 +113,8 @@ | |||
| 113 | (aset powers-of-10 5 '(6400000 . -6)) | 113 | (aset powers-of-10 5 '(6400000 . -6)) |
| 114 | (aset powers-of-10 6 '(8000000 . -3)) | 114 | (aset powers-of-10 6 '(8000000 . -3)) |
| 115 | 115 | ||
| 116 | (setq all-decimal-digs-minval (aref powers-of-10 (1- decimal-digits)) | 116 | (defconst all-decimal-digs-minval (aref powers-of-10 (1- decimal-digits))) |
| 117 | highest-power-of-10 (aref powers-of-10 decimal-digits)) | 117 | (defconst highest-power-of-10 (aref powers-of-10 decimal-digits)) |
| 118 | 118 | ||
| 119 | (defun fashl (fnum) ; floating-point arithmetic shift left | 119 | (defun fashl (fnum) ; floating-point arithmetic shift left |
| 120 | (cons (ash (car fnum) 1) (1- (cdr fnum)))) | 120 | (cons (ash (car fnum) 1) (1- (cdr fnum)))) |
| @@ -150,10 +150,10 @@ | |||
| 150 | (error ""))) | 150 | (error ""))) |
| 151 | 151 | ||
| 152 | ;; support for the multiplication function | 152 | ;; support for the multiplication function |
| 153 | (setq halfword-bits (/ mantissa-bits 2) ; bits in a halfword | 153 | (defconst halfword-bits (/ mantissa-bits 2)) ; bits in a halfword |
| 154 | masklo (1- (ash 1 halfword-bits)) ; isolate the lower halfword | 154 | (defconst masklo (1- (ash 1 halfword-bits))) ; isolate the lower halfword |
| 155 | maskhi (lognot masklo) ; isolate the upper halfword | 155 | (defconst maskhi (lognot masklo)) ; isolate the upper halfword |
| 156 | round-limit (ash 1 (/ halfword-bits 2))) | 156 | (defconst round-limit (ash 1 (/ halfword-bits 2))) |
| 157 | 157 | ||
| 158 | (defun hihalf (n) ; return high halfword, shifted down | 158 | (defun hihalf (n) ; return high halfword, shifted down |
| 159 | (ash (logand n maskhi) (- halfword-bits))) | 159 | (ash (logand n maskhi) (- halfword-bits))) |