diff --git a/NEWS b/NEWS index f364f62f7..d714dcdf2 100644 --- a/NEWS +++ b/NEWS @@ -211,7 +211,7 @@ current values of file descriptors 0, 1, and 2 in the parent process. There is no such concept as a weak binding any more. -** Removed constants: most-positive-fixnum, most-negative-fixnum, bignum-radix +** Removed constants: bignum-radix * Changes to the gh_ interface diff --git a/libguile/ChangeLog b/libguile/ChangeLog index dfd554b8c..c56656314 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,9 @@ +2000-12-13 Dirk Herrmann + + * numbers.c (scm_init_numbers): Re-introduced bindings for + most-positive-fixnum and most-negative-fixnum as requested by + Mikael Djurfeldt. + 2000-12-12 Dirk Herrmann The variable scm_symbols is made static within symbols.c and diff --git a/libguile/numbers.c b/libguile/numbers.c index 022c34cd9..e72d734a4 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -4353,6 +4353,13 @@ scm_num2ulong (SCM num, char *pos, const char *s_caller) void scm_init_numbers () { + /* It may be possible to tune the performance of some algorithms by using + * the following constants to avoid the creation of bignums. Please, before + * using these values, remember the two rules of program optimization: + * 1st Rule: Don't do it. 2nd Rule (experts only): Don't do it yet. */ + scm_sysintern ("most-positive-fixnum", SCM_MAKINUM (SCM_MOST_POSITIVE_FIXNUM)); + scm_sysintern ("most-negative-fixnum", SCM_MAKINUM (SCM_MOST_NEGATIVE_FIXNUM)); + scm_add_feature ("complex"); scm_add_feature ("inexact"); scm_flo0 = scm_make_real (0.0);