X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=blobdiff_plain;f=src%2Fmath%2Flgammal.c;h=5a95266ea1aa81a1c6c4fcfc6b11dfc85f25c60d;hp=c5f604117af7c5049785945cefd18b1b439bf6dc;hb=2c671f66e28ac079ae1148f5135c9a52129cc807;hpb=c886bb85233e642ca37731de72ad3e1f2f18a2f3 diff --git a/src/math/lgammal.c b/src/math/lgammal.c index c5f6041..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) || (!isnan(p->x) && p->x!=-inf && !(p->e&DIVBYZERO) && 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++;