X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fyn.c;h=9dcaa616876c81abd5e9551e7d5a31fdd318601b;hb=7b5ccd5b5297e4a0e413a1517699fbfb5bb575be;hp=9763c405dfab584f37d98a81bd03a73d24b28617;hpb=f3f0ff4782fc90bd0f3e48fd541ee431f76aaed1;p=libc-test diff --git a/src/math/yn.c b/src/math/yn.c index 9763c40..9dcaa61 100644 --- a/src/math/yn.c +++ b/src/math/yn.c @@ -1,6 +1,8 @@ +#define _BSD_SOURCE 1 +#define _XOPEN_SOURCE 700 #include #include -#include "util.h" +#include "mtest.h" static struct di_d t[] = { #include "sanity/yn.h" @@ -32,7 +34,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if ((!(p->x < 0) && !checkulp(d, p->r)) || (p->x < 0 && !isnan(y) && y != -inf)) { printf("%s:%d: %s yn(%a, %lld) want %a got %a, ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->i, p->y, y, d, d-p->dy, p->dy); err++;