mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-16 17:37:34 +02:00
fixing bignum integer-length for real
This commit is contained in:
parent
dc70094472
commit
06d82e5695
1 changed files with 2 additions and 2 deletions
|
@ -266,8 +266,8 @@ static sexp sexp_integer_length (sexp ctx, sexp self, sexp_sint_t n, sexp x) {
|
|||
#if SEXP_USE_BIGNUMS
|
||||
} else if (sexp_bignump(x)) {
|
||||
hi = sexp_bignum_hi(x);
|
||||
return sexp_make_fixnum(integer_log2(sexp_bignum_data(x)[hi])
|
||||
+ hi*sizeof(sexp_uint_t)*CHAR_BIT);
|
||||
return sexp_make_fixnum(integer_log2(sexp_bignum_data(x)[hi-1])
|
||||
+ (hi-1)*sizeof(sexp_uint_t)*CHAR_BIT);
|
||||
#endif
|
||||
} else {
|
||||
return sexp_type_exception(ctx, self, SEXP_FIXNUM, x);
|
||||
|
|
Loading…
Add table
Reference in a new issue