From 38d7f0fab3f1c3a0fb702c25b32560fb1e1ed2b7 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 5 Dec 2013 01:52:13 +0000 Subject: [PATCH] math: only report at most one <2ulp error for acosh and asinh --- src/math/acosh.c | 2 ++ src/math/asinh.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/math/acosh.c b/src/math/acosh.c index d6a5332..a1cc1d9 100644 --- a/src/math/acosh.c +++ b/src/math/acosh.c @@ -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++; diff --git a/src/math/asinh.c b/src/math/asinh.c index 7c82fc2..0d28fff 100644 --- a/src/math/asinh.c +++ b/src/math/asinh.c @@ -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++; -- 2.20.1