math: logb needs to be correctly rounded
authorSzabolcs Nagy <nsz@port70.net>
Sat, 8 Dec 2012 21:04:44 +0000 (22:04 +0100)
committerSzabolcs Nagy <nsz@port70.net>
Sat, 8 Dec 2012 21:04:44 +0000 (22:04 +0100)
src/math/logb.c
src/math/logbf.c
src/math/logbl.c

index c9b90bc..b0ec283 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                        err++;
                }
                d = ulperr(y, p->y, p->dy);
-               if (!checkulp(d, p->r)) {
+               if (!checkcr(y, p->y, p->r)) {
                        printf("%s:%d: %s logb(%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 cb6d357..7d60218 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                        err++;
                }
                d = ulperrf(y, p->y, p->dy);
-               if (!checkulp(d, p->r)) {
+               if (!checkcr(y, p->y, p->r)) {
                        printf("%s:%d: %s logbf(%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 ad0ccff..b314722 100644 (file)
@@ -39,7 +39,7 @@ int main(void)
                        err++;
                }
                d = ulperrl(y, p->y, p->dy);
-               if (!checkulp(d, p->r)) {
+               if (!checkcr(y, p->y, p->r)) {
                        printf("%s:%d: %s logbl(%La) want %La got %La ulperr %.3f = %a + %a\n",
                                p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy);
                        err++;