X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Flgammaf.c;h=d20176b7d7c35f9af9568c90cc43889124268959;hb=1a68cdaedf8e9d379dc742f8a9c6198c0cb99dc5;hp=26edb68437ba9057c7b80dee665971c62bebbdeb;hpb=f3f0ff4782fc90bd0f3e48fd541ee431f76aaed1;p=libc-test diff --git a/src/math/lgammaf.c b/src/math/lgammaf.c index 26edb68..d20176b 100644 --- a/src/math/lgammaf.c +++ b/src/math/lgammaf.c @@ -1,6 +1,8 @@ +#define _BSD_SOURCE 1 +#define _XOPEN_SOURCE 700 #include #include -#include "util.h" +#include "mtest.h" static struct f_fi t[] = { #include "sanity/lgammaf.h" @@ -35,7 +37,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r) || yi != p->i) { + if (!checkulp(d, p->r) || (!isnan(p->x) && p->x!=-inf && !(p->e&DIVBYZERO) && yi != p->i)) { printf("%s:%d: %s lgammaf(%a) want %a,%lld got %a,%d ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, p->i, y, yi, d, d-p->dy, p->dy); err++;