summaryrefslogtreecommitdiff
path: root/pod/perltrap.pod
diff options
context:
space:
mode:
authorAndrey Sapozhnikov <sapa@icb.chel.su>2002-04-20 01:55:56 +0600
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-21 16:29:28 +0000
commita9709c401855e2988a7d96164a23d12b6bf4a06a (patch)
treecb86313db4c794483d66d95cca0c2783b6892c4f /pod/perltrap.pod
parent8abd20a8dbd37aec308f8f9efa9e3b63677392e4 (diff)
downloadperl-a9709c401855e2988a7d96164a23d12b6bf4a06a.tar.gz
Typo in pod/perltrap.pod
Message-ID: <3CC021EC.5080005@icb.chel.su> (tweaked a bit) p4raw-id: //depot/perl@16045
Diffstat (limited to 'pod/perltrap.pod')
-rw-r--r--pod/perltrap.pod14
1 files changed, 10 insertions, 4 deletions
diff --git a/pod/perltrap.pod b/pod/perltrap.pod
index 831d2d5402..06ddb19bfc 100644
--- a/pod/perltrap.pod
+++ b/pod/perltrap.pod
@@ -672,18 +672,24 @@ operands, or output from same.
=item * Numerical
-Formatted output and significant digits
+Formatted output and significant digits. In general, Perl 5
+tries to be more precise. For example, on a Solaris Sparc:
print 7.373504 - 0, "\n";
printf "%20.18f\n", 7.373504 - 0;
# Perl4 prints:
- 7.375039999999996141
- 7.37503999999999614
+ 7.3750399999999996141
+ 7.375039999999999614
# Perl5 prints:
7.373504
- 7.37503999999999614
+ 7.375039999999999614
+
+Notice how the first result looks better in Perl 5.
+
+Your results may vary, since your floating point formatting routines
+and even floating point format may be slightly different.
=item * Numerical