X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Ffma.c;h=24b65c85fd0301b9b6191ad372ed79ade70ab1de;hb=2064be16d307b6409cd518303897cd0763cfdb97;hp=88acd085ff52bbc49d66ed419f212e23ae3449a3;hpb=5729b0cb56800bde195ac79324f23af6a54bdaac;p=libc-test diff --git a/src/math/fma.c b/src/math/fma.c index 88acd08..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,7 +25,12 @@ 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));