summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-10-04 13:58:49 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-04 13:58:49 -0700
commitafa74577a6e8d7cf96f7c62e4acca52fda973699 (patch)
treea269635929639ed9dbf10beae4f99382f480a8f7 /pod
parentb20c4ee1fc23699f6cbe3ce96cc8fe6eb4c52c4c (diff)
downloadperl-afa74577a6e8d7cf96f7c62e4acca52fda973699.tar.gz
[perl #45133] -0.0 has variable Boolean value
This patch makes -0.0 stringify as "0" (while leaving sprintf %g/%f unchanged).
Diffstat (limited to 'pod')
-rw-r--r--pod/perldelta.pod14
1 files changed, 14 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 5cd276e3d4..7e1cca2618 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -131,6 +131,14 @@ The unary negation operator C<-> now treats strings that look like numbers
as numbers
L<[perl #57706]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=57706>.
+=head2 Negative zero
+
+Negative zero (-0.0), when converted to a string, now becomes "0" on all
+platforms. It used to become "-0" on some, but "0" on others.
+
+If you still need to determine whether a zero is negative, use
+C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN.
+
=head1 Deprecations
XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -677,6 +685,12 @@ L<[perl #48332]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48332>.
The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments
L<[perl #20661]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=20661>.
+=item *
+
+Stringifying a scalar containing -0.0 no longer has the affect of turning
+false into true
+L<[perl #45133]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=45133>.
+
=back
=head1 Known Problems