From: Szabolcs Nagy Date: Mon, 12 Nov 2012 21:36:54 +0000 (+0100) Subject: math: fix frexp (don't check iptr when it's not specified) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=9b9e359952c7591c8cf54ae49a412bbc96bc9cd6;p=libc-test math: fix frexp (don't check iptr when it's not specified) --- diff --git a/src/math/frexp.c b/src/math/frexp.c index 5935422..7c40d73 100644 --- a/src/math/frexp.c +++ b/src/math/frexp.c @@ -34,7 +34,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkcr(y, p->y, p->r) || yi != p->i) { + if (!checkcr(y, p->y, p->r) || (isfinite(p->x) && yi != p->i)) { printf("%s:%d: %s frexp(%a) want %a,%lld got %a,%d ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, p->i, y, yi, d, d-p->dy, p->dy); err++; diff --git a/src/math/frexpf.c b/src/math/frexpf.c index 8763be5..a406523 100644 --- a/src/math/frexpf.c +++ b/src/math/frexpf.c @@ -34,7 +34,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkcr(y, p->y, p->r) || yi != p->i) { + if (!checkcr(y, p->y, p->r) || (isfinite(p->x) && yi != p->i)) { printf("%s:%d: %s frexpf(%a) want %a,%lld got %a,%d ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, p->i, y, yi, d, d-p->dy, p->dy); err++; diff --git a/src/math/frexpl.c b/src/math/frexpl.c index e04821b..a28b0fd 100644 --- a/src/math/frexpl.c +++ b/src/math/frexpl.c @@ -40,7 +40,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkcr(y, p->y, p->r) || yi != p->i) { + if (!checkcr(y, p->y, p->r) || (isfinite(p->x) && yi != p->i)) { printf("%s:%d: %s frexpl(%La) want %La,%lld got %La,%d ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, p->i, y, yi, d, d-p->dy, p->dy); err++;