In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a149d1180209525972d84fd1a62f488da83e568a?hp=4c9eaea68a0c4f05bc7ac8b235c83095f53f29d1>

- Log -----------------------------------------------------------------
commit a149d1180209525972d84fd1a62f488da83e568a
Author: Jarkko Hietaniemi <j...@iki.fi>
Date:   Sat Aug 13 19:13:58 2016 -0400

    [perl #128919] limited exponent range in hex fp literal with long double
-----------------------------------------------------------------------

Summary of changes:
 t/op/hexfp.t | 12 +++++++++++-
 toke.c       |  2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/t/op/hexfp.t b/t/op/hexfp.t
index 4b2a96d..d6c0482 100644
--- a/t/op/hexfp.t
+++ b/t/op/hexfp.t
@@ -10,7 +10,7 @@ use strict;
 
 use Config;
 
-plan(tests => 105);
+plan(tests => 109);
 
 # Test hexfloat literals.
 
@@ -243,6 +243,16 @@ SKIP:
     }
 }
 
+# [perl #128919] limited exponent range in hex fp literal with long double
+SKIP: {
+    skip("nv_preserves_uv_bits is $Config{nv_preserves_uv_bits} not 64", 4)
+        unless ($Config{nv_preserves_uv_bits} == 64);
+    is(0x1p-1074,  4.94065645841246544e-324);
+    is(0x1p-1075,  2.47032822920623272e-324, '[perl #128919]');
+    is(0x1p-1076,  1.23516411460311636e-324);
+    is(0x1p-16445, 3.6451995318824746e-4951);
+}
+
 # sprintf %a/%A testing is done in sprintf2.t,
 # trickier than necessary because of long doubles,
 # and because looseness of the spec.
diff --git a/toke.c b/toke.c
index d714759..2c28146 100644
--- a/toke.c
+++ b/toke.c
@@ -10585,7 +10585,7 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
 #ifdef HEXFP_UQUAD
                         hexfp_exp -= hexfp_frac_bits;
 #endif
-                        hexfp_mult = pow(2.0, hexfp_exp);
+                        hexfp_mult = Perl_pow(2.0, hexfp_exp);
                         hexfp = TRUE;
                         goto decimal;
                     }

--
Perl5 Master Repository

Reply via email to