From: Andrey Sapozhnikov Date: Fri, 19 Apr 2002 19:55:56 +0000 (+0600) Subject: Typo in pod/perltrap.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a9709c401855e2988a7d96164a23d12b6bf4a06a;p=p5sagit%2Fp5-mst-13.2.git Typo in pod/perltrap.pod Message-ID: <3CC021EC.5080005@icb.chel.su> (tweaked a bit) p4raw-id: //depot/perl@16045 --- diff --git a/pod/perltrap.pod b/pod/perltrap.pod index 831d2d5..06ddb19 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