X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fy0.c;h=6684822e90da6e7e08f98953ca97ebb82f9ca974;hb=cf1c9918305e2c23758f589a23c1f71af4c431ba;hp=d098064b4a9a61c1c7c79b6f8330d06b7a8a0447;hpb=f3f0ff4782fc90bd0f3e48fd541ee431f76aaed1;p=libc-test diff --git a/src/math/y0.c b/src/math/y0.c index d098064..6684822 100644 --- a/src/math/y0.c +++ b/src/math/y0.c @@ -1,6 +1,8 @@ +#define _BSD_SOURCE 1 +#define _XOPEN_SOURCE 700 #include #include -#include "util.h" +#include "mtest.h" static struct d_d t[] = { #include "sanity/y0.h" @@ -33,10 +35,13 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { - printf("%s:%d: %s y0(%a) want %a got %a ulperr %.3f = %a + %a\n", - p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + if ((!(p->x < 0) && !checkulp(d, p->r)) || (p->x < 0 && !isnan(y) && y != -inf)) { +// printf("%s:%d: %s y0(%a) want %a got %a ulperr %.3f = %a + %a\n", +// p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; + // TODO: avoid spamming the output + printf(__FILE__ ": known to be broken near zeros\n"); + break; } } return !!err;