fix inexact-number parsing problem

Bug introduced in c40229f756.
This commit is contained in:
Matthew Flatt 2015-11-22 06:50:15 -07:00
parent f5dbd99e43
commit 901ffdcbac
2 changed files with 3 additions and 1 deletions

View File

@ -53,6 +53,7 @@
(-0.0 "-1#e-10000000000000000000000000000000") (-0.0 "-1#e-10000000000000000000000000000000")
(1e-134 (1e-134
"0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001") "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001")
(-0.0 "-632.3206524753840966914228247597079196012717570277972845484e-399")
(10.0 "1#") (10.0 "1#")
(10.0 "1#e0") (10.0 "1#e0")
(10.0 "1####e-3") (10.0 "1####e-3")

View File

@ -1481,7 +1481,8 @@ Scheme_Object *scheme_read_number(const mzchar *str, intptr_t len,
max_useful = scheme_bin_plus(scheme_make_integer(MAX_FLOATREAD_PRECISION_DIGITS(is_long_double)), max_useful = scheme_bin_plus(scheme_make_integer(MAX_FLOATREAD_PRECISION_DIGITS(is_long_double)),
exponent); exponent);
if (scheme_bin_lt(max_useful, scheme_make_integer(0))) { if (scheme_bin_lt(max_useful, scheme_make_integer(2))) {
/* will definitely underflow */
if (dcp > 2) if (dcp > 2)
dcp = 2; /* leave room for a sign and a digit */ dcp = 2; /* leave room for a sign and a digit */
} else if (SCHEME_INTP(max_useful)) { } else if (SCHEME_INTP(max_useful)) {