diff options
Diffstat (limited to 'libguile/numbers.h')
-rw-r--r-- | libguile/numbers.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libguile/numbers.h b/libguile/numbers.h index 6a78c5910..d5b2809e7 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -52,7 +52,6 @@ - /* Immediate Numbers * * Inums are exact integer data that fits within an SCM word. @@ -63,6 +62,11 @@ * SCM_INUMP (SCM_CAR (x)) can give wrong answers. */ +#define SCM_FIXNUM_BIT (SCM_LONG_BIT - 2) +#define SCM_MOST_POSITIVE_FIXNUM ((1L << (SCM_FIXNUM_BIT - 1)) - 1) +#define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM - 1) + + /* SCM_SRS is signed right shift */ #if (-1 == (((-1) << 2) + 2) >> 2) # define SCM_SRS(x, y) ((x) >> (y)) @@ -111,15 +115,7 @@ /* SCM_INTBUFLEN is the maximum number of characters neccessary for the * printed or scm_string representation of an exact immediate. */ - -#ifndef SCM_CHAR_BIT -# define SCM_CHAR_BIT 8 -#endif /* ndef SCM_CHAR_BIT */ -#ifndef SCM_LONG_BIT -# define SCM_LONG_BIT (SCM_CHAR_BIT*sizeof(long)/sizeof(char)) -#endif /* ndef SCM_LONG_BIT */ -#define SCM_INTBUFLEN (5+SCM_LONG_BIT) - +#define SCM_INTBUFLEN (5 + SCM_LONG_BIT) |