This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add todo comment about special hexfp values.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 19 Aug 2014 22:44:30 +0000 (18:44 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 20 Aug 2014 12:20:03 +0000 (08:20 -0400)
sv.c

diff --git a/sv.c b/sv.c
index 2458a9f..92c34a8 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -11853,6 +11853,14 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
                 int zerotail = 0; /* how many extra zeros to append */
                 int exponent = 0; /* exponent of the floating point input */
 
                 int zerotail = 0; /* how many extra zeros to append */
                 int exponent = 0; /* exponent of the floating point input */
 
+                /* XXX: denormals, NaN, Inf.
+                 *
+                 * For example with denormals, (assuming the vanilla
+                 * 64-bit double): the exponent is zero. 1xp-1074 is
+                 * the smallest denormal and the smallest double, it
+                 * should be output as 0x0.0000000000001p-1022 to
+                 * match its internal structure. */
+
                 vend = S_hextract(aTHX_ nv, &exponent, vhex, NULL);
                 S_hextract(aTHX_ nv, &exponent, vhex, vend);
 
                 vend = S_hextract(aTHX_ nv, &exponent, vhex, NULL);
                 S_hextract(aTHX_ nv, &exponent, vhex, vend);