X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Ffma.c;h=24b65c85fd0301b9b6191ad372ed79ade70ab1de;hb=cf1c9918305e2c23758f589a23c1f71af4c431ba;hp=4a353f9a29abe11b703766a1e45ac6acacfd630d;hpb=588927eced2aa02855723750217fe3fc26404da9;p=libc-test diff --git a/src/math/fma.c b/src/math/fma.c index 4a353f9..24b65c8 100644 --- a/src/math/fma.c +++ b/src/math/fma.c @@ -1,9 +1,10 @@ #include #include -#include "util.h" +#include "mtest.h" static struct ddd_d t[] = { #include "sanity/fma.h" +#include "special/fma.h" }; int main(void) @@ -24,14 +25,19 @@ int main(void) y = fma(p->x, p->x2, p->x3); e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); - if (!checkexcept(e, p->e, p->r)) { + /* do not check inexact by default */ +#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION + if (!checkexceptall(e, p->e, p->r)) { +#else + if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) { +#endif printf("%s:%d: bad fp exception: %s fma(%a,%a,%a)=%a, want %s", p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fma(%a,%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy); err++;