mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-03 19:26:36 +02:00
Fix in sexp_bignum_quot_rem when the numerator and divisor are equal.
Fixes issue #269.
This commit is contained in:
parent
dfc5ca6913
commit
4fc7181c2c
1 changed files with 1 additions and 1 deletions
2
bignum.c
2
bignum.c
|
@ -512,7 +512,7 @@ sexp sexp_bignum_quot_rem (sexp ctx, sexp *rem, sexp a, sexp b) {
|
|||
sexp_bignum_sign(b1) = 1;
|
||||
q = SEXP_ZERO;
|
||||
x = sexp_make_bignum(ctx, sexp_bignum_length(a));
|
||||
while (sexp_bignum_compare_abs(a1, b1) > 0) { /* a1, b1 at least 2 bigits */
|
||||
while (sexp_bignum_compare_abs(a1, b1) >= 0) { /* a1, b1 at least 2 bigits */
|
||||
/* guess divisor x */
|
||||
alen = sexp_bignum_hi(a1);
|
||||
sexp_bignum_data(x)[off] = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue