X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Ffma.c;h=24b65c85fd0301b9b6191ad372ed79ade70ab1de;hb=cf1c9918305e2c23758f589a23c1f71af4c431ba;hp=bb83520ece7c840485eac6d603ebf08d93b21f8d;hpb=f3f0ff4782fc90bd0f3e48fd541ee431f76aaed1;p=libc-test diff --git a/src/math/fma.c b/src/math/fma.c index bb83520..24b65c8 100644 --- a/src/math/fma.c +++ b/src/math/fma.c @@ -1,6 +1,6 @@ #include #include -#include "util.h" +#include "mtest.h" static struct ddd_d t[] = { #include "sanity/fma.h" @@ -25,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));