math: fix some invalid checks (remquo, lrint, lround, y0, y1, yn)
[libc-test] / src / math / remquol.c
index a06497d..6a75008 100644 (file)
@@ -4,6 +4,7 @@
 
 static struct ll_li t[] = {
 #include "sanity/remquol.h"
+#include "special/remquol.h"
 };
 
 int main(void)
@@ -32,7 +33,9 @@ int main(void)
                        err++;
                }
                d = ulperr(y, p->y, p->dy);
-               if (!checkulp(d, p->r) || (yi & 7) != (p->i & 7) || (yi < 0) != (p->i < 0)) {
+               if (!checkulp(d, p->r) ||
+               (!isnan(p->y) && (yi & 7) != (p->i & 7)) ||
+               (!isnan(p->y) && (yi < 0) != (p->i < 0))) {
                        printf("%s:%d: %s remquol(%La,%La) want %La,%lld got %La,%d ulperr %.3f = %a + %a\n",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, p->i, y, yi, d, d-p->dy, p->dy);
                        err++;