From d4eaecd65837c6bf55b453c959cf87b725d783e3 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Thu, 28 Jan 2010 01:02:33 +0900 Subject: [PATCH] (/ big big) and (- big flo) patches from lorenzo campedelli (issue 31) --- opt/bignum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opt/bignum.c b/opt/bignum.c index 2cd42bb0..7e48466c 100644 --- a/opt/bignum.c +++ b/opt/bignum.c @@ -565,6 +565,7 @@ sexp sexp_sub (sexp ctx, sexp a, sexp b) { break; case SEXP_NUM_BIG_FLO: r = sexp_make_flonum(ctx, sexp_flonum_value(b) - sexp_bignum_to_double(a)); + break; case SEXP_NUM_BIG_BIG: r = sexp_bignum_normalize(sexp_bignum_sub(ctx, NULL, a, b)); break; @@ -646,7 +647,7 @@ sexp sexp_div (sexp ctx, sexp a, sexp b) { r = sexp_bignum_quot_rem(ctx, &rem, a, b); if (sexp_bignum_normalize(rem) != SEXP_ZERO) r = sexp_make_flonum(ctx, sexp_bignum_to_double(a) - / sexp_fixnum_to_double(b)); + / sexp_bignum_to_double(b)); else r = sexp_bignum_normalize(r); break;