mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 05:06:37 +02:00
fixing division of flonum by fixnum (issue #25)
This commit is contained in:
parent
ce5946578a
commit
925401c114
1 changed files with 1 additions and 1 deletions
|
@ -631,7 +631,7 @@ sexp sexp_div (sexp ctx, sexp a, sexp b) {
|
||||||
r = sexp_make_flonum(ctx, sexp_fixnum_to_double(a)/sexp_bignum_to_double(b));
|
r = sexp_make_flonum(ctx, sexp_fixnum_to_double(a)/sexp_bignum_to_double(b));
|
||||||
break;
|
break;
|
||||||
case SEXP_NUM_FLO_FIX:
|
case SEXP_NUM_FLO_FIX:
|
||||||
r = sexp_make_flonum(ctx, sexp_fixnum_to_double(b)/sexp_flonum_value(a));
|
r = sexp_make_flonum(ctx, sexp_flonum_value(a)/sexp_fixnum_to_double(b));
|
||||||
break;
|
break;
|
||||||
case SEXP_NUM_FLO_FLO:
|
case SEXP_NUM_FLO_FLO:
|
||||||
r = sexp_fp_div(ctx, a, b);
|
r = sexp_fp_div(ctx, a, b);
|
||||||
|
|
Loading…
Add table
Reference in a new issue