X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fmodf.c;h=b724650309ae2d99df5274f1b91978b923389e31;hb=ff1a08c16ea49fa2bd3260a3b327b5dcaa5d13a6;hp=86be04f499aa139032eaa9065e5f8f38c9ed894d;hpb=cb9f87af9a1f917facd1140603b24f1087729751;p=libc-test diff --git a/src/math/modf.c b/src/math/modf.c index 86be04f..b724650 100644 --- a/src/math/modf.c +++ b/src/math/modf.c @@ -1,9 +1,10 @@ #include #include -#include "util.h" +#include "mtest.h" static struct d_dd t[] = { #include "sanity/modf.h" +#include "special/modf.h" }; int main(void) @@ -24,7 +25,8 @@ int main(void) y = modf(p->x, &yi); e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); - if (!checkexcept(e, p->e, p->r)) { + /* TODO: fix inexact */ + if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) { printf("%s:%d: bad fp exception: %s modf(%a)=%a,%a, want %s", p->file, p->line, rstr(p->r), p->x, p->y, p->y2, estr(p->e)); printf(" got %s\n", estr(e)); @@ -32,7 +34,7 @@ int main(void) } d = ulperr(y, p->y, p->dy); di = ulperr(yi, p->y2, p->dy2); - if (!checkulp(d, p->r) || !checkulp(di, p->r)) { + if (!checkcr(y, p->y, p->r) || !checkcr(yi, p->y2, p->r)) { printf("%s:%d: %s modf(%a) want %a,%a got %a,%a, ulperr %.3f = %a + %a, %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, p->y2, y, yi, d, d-p->dy, p->dy, di, di-p->dy2, p->dy2); err++;