math: only report at most one <2ulp error for acosh and asinh
authorSzabolcs Nagy <nsz@port70.net>
Thu, 5 Dec 2013 01:52:13 +0000 (01:52 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Thu, 5 Dec 2013 01:52:13 +0000 (01:52 +0000)
src/math/acosh.c
src/math/asinh.c

index d6a5332..a1cc1d9 100644 (file)
@@ -34,6 +34,8 @@ int main(void)
                }
                d = ulperr(y, p->y, p->dy);
                if (!checkulp(d, p->r)) {
+                       // only report at most one <2ulp error
+                       if (fabsf(d) < 2 && err) continue;
                        printf("%s:%d: %s acosh(%a) want %a got %a ulperr %.3f = %a + %a\n",
                                p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy);
                        err++;
index 7c82fc2..0d28fff 100644 (file)
@@ -34,6 +34,8 @@ int main(void)
                }
                d = ulperr(y, p->y, p->dy);
                if (!checkulp(d, p->r)) {
+                       // only report at most one <2ulp error
+                       if (fabsf(d) < 2 && err) continue;
                        printf("%s:%d: %s asinh(%a) want %a got %a ulperr %.3f = %a + %a\n",
                                p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy);
                        err++;