Skip to content

Commit

Permalink
POSIX: the fallback copysign() doesn't handle NaNs
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz committed Nov 8, 2023
1 parent 6afd9e5 commit 72ae6b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/POSIX/t/math.t
Expand Up @@ -293,6 +293,8 @@ SKIP: {
like(NAN, qr/^NaN/, "NAN is Perl's NaN");
cmp_ok(NAN, '!=', NAN, "NAN != NAN");
ok(!(NAN == NAN), "NAN == NAN");
# we have a fallback copysign(), but it doesn't work for NaN
skip('no copysign', 2) unless $Config{d_copysign};
ok(!signbit(copysign(NAN, 1.0)), "signbit(copysign(NAN, 1.0)))");
ok(signbit(copysign(NAN, -1.0)), "signbit(copysign(NAN, -1.0)))");
}
Expand Down

0 comments on commit 72ae6b5

Please sign in to comment.