* numbers.c: Document macros to define when including
authorMarius Vollmer <mvo@zagadka.de>
Mon, 12 Nov 2001 01:12:37 +0000 (01:12 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Mon, 12 Nov 2001 01:12:37 +0000 (01:12 +0000)
commit3d2e8ceb97e7f8ba975d73028f8b7a258d349556
tree48891d8811bd791db6c26181afbe89712e55b72e
parentfdf773fa8f5079ea9194d6a0ed01631d4ccd99a9
* numbers.c: Document macros to define when including
num2integral.i.c.  MAX_VALUE and MIN_VALU are no longer used, we
now rely on SIZEOF_ macros that have been figured out at
configure time.

* num2integral.i.c: Adapt to new interface.
(NUM2INTEGRAL): Test whether a fixnum can be represented in the
target type by casting it and checking whether it is still the
same.  Do not try to handle bignums for integral types that are
smaller than fixnums.  When handling bignums, collect the
magnituse first into a unsigned type, and correctly check for
overflow.
(INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
only -MIN_VALUE can still be negative of all negative numbers (in
twos-complement).
libguile/num2integral.i.c
libguile/numbers.c