In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/173ff9fbe44ea216f1dca2eeda47c82cd9ca55e5?hp=9267464d98c4b9588c96a4fff7202bbe3b09f9a8>

- Log -----------------------------------------------------------------
commit 173ff9fbe44ea216f1dca2eeda47c82cd9ca55e5
Author: Jarkko Hietaniemi <[email protected]>
Date:   Fri Sep 12 08:34:07 2014 -0400

    The space computation for hexfp was overovershooting.
-----------------------------------------------------------------------

Summary of changes:
 sv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sv.c b/sv.c
index 8436c2d..c71f5c5 100644
--- a/sv.c
+++ b/sv.c
@@ -11832,7 +11832,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char 
*const pat, const STRLEN p
                         1 + /* "." */
                         2 * NVSIZE + /* 2 hexdigits for each byte */
                         2 + /* "p+" */
-                        BIT_DIGITS(NV_MAX_EXP) + /* exponent */
+                        6 + /* exponent: sign, plus up to 16383 (quad fp) */
                         1;   /* \0 */
 #ifdef LONGDOUBLE_DOUBLEDOUBLE
                     /* However, for the "double double", we need more.
@@ -11846,7 +11846,8 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char 
*const pat, const STRLEN p
                      * for the future.) */
 
                     /* 2 hexdigits for each byte. */ 
-                    need += (DOUBLEDOUBLE_MAXBITS/8 - DOUBLESIZE + 1) * 2;
+                    need += (DOUBLEDOUBLE_MAXBITS/8 + 1) * 2;
+                    /* the size for the exponent already added */
 #endif
 #ifdef USE_LOCALE_NUMERIC
                         STORE_LC_NUMERIC_SET_TO_NEEDED();

--
Perl5 Master Repository

Reply via email to