X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fmodfl.c;h=943364402227b555b3e64d6974f6d6a760e3d24a;hb=517ccafc57089ac88b88050a4c7ab0ece4235e19;hp=72d3b1dbac86d1dc2ab6638cb378e8967cbd47ee;hpb=cb9f87af9a1f917facd1140603b24f1087729751;p=libc-test diff --git a/src/math/modfl.c b/src/math/modfl.c index 72d3b1d..9433644 100644 --- a/src/math/modfl.c +++ b/src/math/modfl.c @@ -1,12 +1,14 @@ #include #include -#include "util.h" +#include "mtest.h" static struct l_ll t[] = { #if LDBL_MANT_DIG == 53 #include "sanity/modf.h" +#include "special/modf.h" #elif LDBL_MANT_DIG == 64 #include "sanity/modfl.h" +#include "special/modfl.h" #endif }; @@ -28,7 +30,8 @@ int main(void) y = modfl(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(%La)=%La,%La, want %s", p->file, p->line, rstr(p->r), p->x, p->y, p->y2, estr(p->e)); printf(" got %s\n", estr(e)); @@ -36,7 +39,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(%La) want %La,%La got %La,%La, 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++;