This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure: signbit scan assuming too much
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 21 Oct 2016 12:33:16 +0000 (08:33 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 22 Oct 2016 00:13:40 +0000 (20:13 -0400)
It was assuming a negative zero, which is an IEEE-754 only concept.

There is no need to assume the negative zero for the correct
functioning of the signbit, however.

Configure

index 7c598e9..a68b670 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -18802,7 +18802,7 @@ $cat >try.c <<EOCP
 int main(int argc, char **argv)
 {
     NV x = 0.0;
 int main(int argc, char **argv)
 {
     NV x = 0.0;
-    NV y = -0.0;
+    NV y = -1.0;
     if ((signbit(x) == 0) && (signbit(y) != 0))
        return 0;
     else
     if ((signbit(x) == 0) && (signbit(y) != 0))
        return 0;
     else