summaryrefslogtreecommitdiff
path: root/pod/perlpacktut.pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-08-26 18:17:51 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-08-26 18:18:27 -0400
commitaacf4ea26d4513c6378ba30b3ddef2101de36280 (patch)
tree40af62731a9d6e72377a62e6ba2bcdb6f90adcfe /pod/perlpacktut.pod
parentcfa562529cf247facc919c1e0d7ae057a190de6c (diff)
downloadperl-aacf4ea26d4513c6378ba30b3ddef2101de36280.tar.gz
Sprinkle the fact that long doubles aren't standardized.
Diffstat (limited to 'pod/perlpacktut.pod')
-rw-r--r--pod/perlpacktut.pod21
1 files changed, 13 insertions, 8 deletions
diff --git a/pod/perlpacktut.pod b/pod/perlpacktut.pod
index 608a592c27..a710f20f3f 100644
--- a/pod/perlpacktut.pod
+++ b/pod/perlpacktut.pod
@@ -496,14 +496,19 @@ For packing floating point numbers you have the choice between the
pack codes C<f>, C<d>, C<F> and C<D>. C<f> and C<d> pack into (or unpack
from) single-precision or double-precision representation as it is provided
by your system. If your systems supports it, C<D> can be used to pack and
-unpack extended-precision floating point values (C<long double>), which
-can offer even more resolution than C<f> or C<d>. C<F> packs an C<NV>,
-which is the floating point type used by Perl internally. (There
-is no such thing as a network representation for reals, so if you want
-to send your real numbers across computer boundaries, you'd better stick
-to ASCII representation, unless you're absolutely sure what's on the other
-end of the line. For the even more adventuresome, you can use the byte-order
-modifiers from the previous section also on floating point codes.)
+unpack (C<long double>) values, which can offer even more resolution
+than C<f> or C<d>. B<Note that there are different long double formats.>
+
+C<F> packs an C<NV>, which is the floating point type used by Perl
+internally.
+
+There is no such thing as a network representation for reals, so if
+you want to send your real numbers across computer boundaries, you'd
+better stick to text representation, possibly using the hexadecimal
+float format (avoiding the decimal conversion loss), unless you're
+absolutely sure what's on the other end of the line. For the even more
+adventuresome, you can use the byte-order modifiers from the previous
+section also on floating point codes.