X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=blobdiff_plain;f=src%2Fmath%2Flgammal.c;h=5a95266ea1aa81a1c6c4fcfc6b11dfc85f25c60d;hp=352df9b5fd3742f48ff18128f4ea470309e631b0;hb=2c671f66e28ac079ae1148f5135c9a52129cc807;hpb=f3f0ff4782fc90bd0f3e48fd541ee431f76aaed1 diff --git a/src/math/lgammal.c b/src/math/lgammal.c index 352df9b..5a95266 100644 --- a/src/math/lgammal.c +++ b/src/math/lgammal.c @@ -1,6 +1,9 @@ +#define _DEFAULT_SOURCE 1 +#define _BSD_SOURCE 1 +#define _XOPEN_SOURCE 700 #include #include -#include "util.h" +#include "mtest.h" static struct l_li t[] = { #if LDBL_MANT_DIG == 53 @@ -41,7 +44,8 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r) || yi != p->i) { + // TODO: 2 ulp errors allowed + if ((p->r==RN && fabs(d) > 2) || (!isnan(p->x) && p->x!=-inf && !(p->e&DIVBYZERO) && yi != p->i)) { printf("%s:%d: %s lgammal(%La) want %La,%lld got %La,%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++;