preserving exactness when adding ratios and complex numbers

This commit is contained in:
Alex Shinn 2012-07-11 23:17:41 +09:00
parent 65f5e9823a
commit d669b8a788

View file

@ -995,8 +995,6 @@ sexp sexp_add (sexp ctx, sexp a, sexp b) {
#if SEXP_USE_COMPLEX #if SEXP_USE_COMPLEX
#if SEXP_USE_RATIOS #if SEXP_USE_RATIOS
case SEXP_NUM_RAT_CPX: case SEXP_NUM_RAT_CPX:
a = tmp = sexp_make_flonum(ctx, sexp_ratio_to_double(a));
/* ... FALLTHROUGH ... */
#endif #endif
case SEXP_NUM_FLO_CPX: case SEXP_NUM_FLO_CPX:
case SEXP_NUM_FIX_CPX: case SEXP_NUM_FIX_CPX: