math: fenv status flag fixes
[libc-test] / src / math / modff.c
index e6ed290..d599f9f 100644 (file)
@@ -1,9 +1,10 @@
 #include <stdint.h>
 #include <stdio.h>
-#include "util.h"
+#include "mtest.h"
 
 static struct f_ff t[] = {
 #include "sanity/modff.h"
+#include "special/modff.h"
 };
 
 int main(void)
@@ -24,7 +25,7 @@ int main(void)
                y = modff(p->x, &yi);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s modff(%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 +33,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 modff(%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++;