Now (fixnum? (expt 2 24)) returns #t as it should.
long n1 = (FIXNUM_TO_LONG (n));
if (n1 < 0)
{
- if ((m + (ulong_length_in_bits (~n1))) < FIXNUM_LENGTH)
+ if ((m + (ulong_length_in_bits (~n1))) <= FIXNUM_LENGTH)
/* The behaviour of shifting a negative integer is
undefined in C. */
return (LONG_TO_FIXNUM (- ((-n1) << m)));
}
else if (0 < n1)
{
- if ((m + (ulong_length_in_bits (n1))) < FIXNUM_LENGTH)
+ if ((m + (ulong_length_in_bits (n1))) <= FIXNUM_LENGTH)
return (LONG_TO_FIXNUM (n1 << m));
else
return (unsigned_long_to_shifted_bignum (n1, m, 0));