From 4dcfb8aa6b05bf18964690eaed983c49b2ac0cbd Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Fri, 5 Feb 2010 13:42:30 +0900 Subject: [PATCH] exponents in numbers always indicate inexactness per R5RS (indirectly fixes issue 34) --- sexp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sexp.c b/sexp.c index 58dc734b..d0c41eaf 100644 --- a/sexp.c +++ b/sexp.c @@ -1325,10 +1325,7 @@ sexp sexp_read_float_tail(sexp ctx, sexp in, double whole, int negp) { } res = (whole + res) * pow(10, e); if (negp) res *= -1; - if ((scale == 0.1) && (exponent != SEXP_VOID) && (res == round(res))) - return sexp_make_fixnum(res); - else - return sexp_make_flonum(ctx, res); + return sexp_make_flonum(ctx, res); } sexp sexp_read_number(sexp ctx, sexp in, int base) {