fix too-early exact->inexact conversion in number parsing
Robby found this bug, continuing his streak that included find the bugs behind commitsf5dbd99e43
and901ffdcbac
.
This commit is contained in:
parent
2a88662d01
commit
ce7487182a
|
@ -54,6 +54,9 @@
|
|||
(1e-134
|
||||
"0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001")
|
||||
(-0.0 "-632.3206524753840966914228247597079196012717570277972845484e-399")
|
||||
(1e-300
|
||||
;; check e->i only after division is performed
|
||||
"#i500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
|
||||
(10.0 "1#")
|
||||
(10.0 "1#e0")
|
||||
(10.0 "1####e-3")
|
||||
|
|
|
@ -1582,7 +1582,8 @@ Scheme_Object *scheme_read_number(const mzchar *str, intptr_t len,
|
|||
first[has_slash - delta] = 0;
|
||||
|
||||
n1 = scheme_read_number(first, has_slash - delta,
|
||||
is_float, is_not_float, 1,
|
||||
/* recur without is_float to keep all precision */
|
||||
0, is_not_float, 1,
|
||||
radix, 1, next_complain,
|
||||
div_by_zero,
|
||||
test_only,
|
||||
|
@ -1606,7 +1607,8 @@ Scheme_Object *scheme_read_number(const mzchar *str, intptr_t len,
|
|||
#endif
|
||||
|
||||
n2 = scheme_read_number(substr, len - has_slash - 1,
|
||||
is_float, is_not_float, 1,
|
||||
/* recur without is_float to keep all precision */
|
||||
0, is_not_float, 1,
|
||||
radix, 1, next_complain,
|
||||
div_by_zero,
|
||||
test_only,
|
||||
|
|
Loading…
Reference in New Issue
Block a user