[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/libguile numbers.h
From: |
Marius Vollmer |
Subject: |
guile/guile-core/libguile numbers.h |
Date: |
Sat, 06 Oct 2001 16:48:27 -0400 |
CVSROOT: /cvs
Module name: guile
Changes by: Marius Vollmer <address@hidden> 01/10/06 16:48:27
Modified files:
guile-core/libguile: numbers.h
Log message:
Corrected definition of SCM_MOST_POSITIVE_FIXNUM. Boy was I confused.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/numbers.h.diff?cvsroot=OldCVS&tr1=1.59&tr2=1.60&r1=text&r2=text
Patches:
Index: guile/guile-core/libguile/numbers.h
diff -u guile/guile-core/libguile/numbers.h:1.59
guile/guile-core/libguile/numbers.h:1.60
--- guile/guile-core/libguile/numbers.h:1.59 Sat Oct 6 15:58:02 2001
+++ guile/guile-core/libguile/numbers.h Sat Oct 6 16:48:27 2001
@@ -55,8 +55,13 @@
*
* Inums are exact integer data that fits within an SCM word. */
+/* SCM_T_SIGNED_MAX is (- (expt 2 n) 1),
+ * SCM_MOST_POSITIVE_FIXNUM should be (- (expt 2 (- n 2)) 1)
+ * which is the same as (/ (- (expt 2 n) 4) 4)
+ */
+
#define SCM_I_FIXNUM_BIT (SCM_LONG_BIT - 2)
-#define SCM_MOST_POSITIVE_FIXNUM (SCM_T_SIGNED_BITS_MAX/8-1)
+#define SCM_MOST_POSITIVE_FIXNUM ((SCM_T_SIGNED_BITS_MAX-3)/4)
#define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM-1)
/* SCM_SRS is signed right shift */
@@ -83,7 +88,7 @@
#define SCM_INUM0 (SCM_MAKINUM (0))
-/* SCM_MAXEXP is the maximum double precision expontent
+/* SCM_MAXEXP is the maximum double precision exponent
* SCM_FLTMAX is less than or scm_equal the largest single precision float
*/