From 8d3f8e1b1fcc1abac1967bb9cf9643b63f3dea6d Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 5 Mar 2013 05:45:37 -0500 Subject: [PATCH 09/10] Support reading negative exponents larger than SCM_MAXEXP. * libguile/numbers.c (mem2decimal_from_point): Accept negative exponents larger than SCM_MAXEXP that produce subnormals. --- libguile/numbers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguile/numbers.c b/libguile/numbers.c index 601b2a6..c19b380 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -5929,7 +5929,7 @@ mem2decimal_from_point (SCM result, SCM mem, break; } - if (exponent > SCM_MAXEXP) + if (exponent > ((sign == 1) ? SCM_MAXEXP : SCM_MAXEXP + DBL_DIG + 1)) { size_t exp_len = idx - start; SCM exp_string = scm_i_substring_copy (mem, start, start + exp_len); -- 1.7.10.4