summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/POSIX.xs2
-rw-r--r--ext/POSIX/t/math.t3
2 files changed, 2 insertions, 3 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 930b83516a..923b3d3400 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -2278,6 +2278,8 @@ fpclassify(x)
default:
#ifdef Perl_signbit
RETVAL = Perl_signbit(x);
+#else
+ RETVAL = (x < 0) || (x == -0.0);
#endif
break;
}
diff --git a/ext/POSIX/t/math.t b/ext/POSIX/t/math.t
index c3232c15af..8a15d7734c 100644
--- a/ext/POSIX/t/math.t
+++ b/ext/POSIX/t/math.t
@@ -117,9 +117,6 @@ SKIP: {
cmp_ok(abs(log1p(1e-6) - 9.99999500000333e-07), '<', 1e-9, "log1p");
cmp_ok(abs(log2(8) - 3), '<', 1e-9, "log2");
SKIP: {
- unless ($Config{d_signbit}) {
- skip "no signbit", 2;
- }
is(signbit(2), 0, "signbit 2"); # zero
ok(signbit(-2), "signbit -2"); # non-zero
}