diff options
author | TAKAI Kousuke <62541129+t-a-k@users.noreply.github.com> | 2021-01-08 01:05:15 +0900 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-01-17 09:19:13 -0700 |
commit | b12f49e146363ad6d1b9f1ae5fd68c9112ae5506 (patch) | |
tree | ec2195c7bde0f1625b8fff17613502c34245e32e | |
parent | 9824c081922f8e3697322536c3da1702e35e45ab (diff) | |
download | perl-b12f49e146363ad6d1b9f1ae5fd68c9112ae5506.tar.gz |
perldiag.pod: Correct description for "Lost precision when %s %f by 1" warning.
The description of this warning used to state that "the target of
C<++> or C<--> is unchanged", but there had been the case where
the target is changed by some value while this warning is issued.
-rw-r--r-- | pod/perldiag.pod | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index fd2833a361..de9e772412 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3488,9 +3488,12 @@ handle. This restriction may be eased in a future release. =item Lost precision when %s %f by 1 -(W imprecision) The value you attempted to increment or decrement by one -is too large for the underlying floating point representation to store -accurately, hence the target of C<++> or C<--> is unchanged. Perl issues this +(W imprecision) You attempted to increment or decrement a value by one, +but the result is too large for the underlying floating point +representation to store accurately. Hence, the target of C<++> or C<--> +is increased or decreased by quite different value than one, such as +zero (I<i.e.> the target is unchanged) or two, due to rounding. +Perl issues this warning because it has already switched from integers to floating point when values are too large for integers, and now even floating point is insufficient. You may wish to switch to using L<Math::BigInt> explicitly. |