math: fenv status flag fixes
authorSzabolcs Nagy <nsz@port70.net>
Mon, 12 Aug 2013 19:57:42 +0000 (19:57 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Mon, 12 Aug 2013 19:57:42 +0000 (19:57 +0000)
all flags are checked for tecorrectly rounded functions except
inexact for fma
all flags but inexact are tested for other functions
fix pow(0,-inf) test case (should raise divbyzero, mpfr bug)
add underflow related testcases

80 files changed:
src/common/mtest.h
src/functional/random.c
src/math/ceil.c
src/math/ceilf.c
src/math/ceill.c
src/math/copysign.c
src/math/copysignf.c
src/math/copysignl.c
src/math/fabs.c
src/math/fabsf.c
src/math/fabsl.c
src/math/fdim.c
src/math/fdimf.c
src/math/fdiml.c
src/math/floor.c
src/math/floorf.c
src/math/floorl.c
src/math/fma.c
src/math/fmaf.c
src/math/fmal.c
src/math/fmax.c
src/math/fmaxf.c
src/math/fmaxl.c
src/math/fmin.c
src/math/fminf.c
src/math/fminl.c
src/math/frexp.c
src/math/frexpf.c
src/math/frexpl.c
src/math/ldexp.c
src/math/ldexpf.c
src/math/ldexpl.c
src/math/logb.c
src/math/logbf.c
src/math/logbl.c
src/math/modf.c
src/math/modff.c
src/math/modfl.c
src/math/nearbyint.c
src/math/nearbyintf.c
src/math/nearbyintl.c
src/math/nextafter.c
src/math/nextafterf.c
src/math/nextafterl.c
src/math/nexttoward.c
src/math/nexttowardf.c
src/math/nexttowardl.c
src/math/rint.c
src/math/rintf.c
src/math/rintl.c
src/math/round.c
src/math/roundf.c
src/math/roundl.c
src/math/scalb.c
src/math/scalbf.c
src/math/scalbln.c
src/math/scalblnf.c
src/math/scalblnl.c
src/math/scalbn.c
src/math/scalbnf.c
src/math/scalbnl.c
src/math/special/atan2.h
src/math/special/atan2f.h
src/math/special/atan2l.h
src/math/special/expm1.h
src/math/special/log1pf.h
src/math/special/pow.h
src/math/special/powf.h
src/math/special/powl.h
src/math/special/remainder.h
src/math/special/remainderf.h
src/math/special/remainderl.h
src/math/sqrt.c
src/math/sqrtf.c
src/math/sqrtl.c
src/math/trunc.c
src/math/truncf.c
src/math/truncl.c
src/math/ucb/pow.h
src/math/ucb/powf.h

index 9218a75..d390d03 100644 (file)
@@ -102,10 +102,21 @@ float ulperrl(long double got, long double want, float dwant);
 static int checkexcept(int got, int want, int r)
 {
        if (r == RN)
+#if defined CHECK_INEXACT
+               return got == want;
+#elif defined CHECK_INEXACT_OMISSION
                return got == want || got == (want|INEXACT);
+#else
+               return (got|INEXACT) == (want|INEXACT);
+#endif
        return (got|INEXACT|UNDERFLOW) == (want|INEXACT|UNDERFLOW);
 }
 
+static int checkexceptall(int got, int want, int r)
+{
+       return got == want;
+}
+
 static int checkulp(float d, int r)
 {
        // TODO: we only care about >=1.5 ulp errors for now, should be 1.0
index 65bbf28..69596fb 100644 (file)
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 700
 #include <stdio.h>
 #include <stdlib.h>
 #include "test.h"
index 0b88c25..253654c 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = ceil(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s ceil(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 03d7dfb..3d20997 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = ceilf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s ceilf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index d812dee..2674c56 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                y = ceill(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s ceill(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 7ef6423..ecc3719 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = copysign(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s copysign(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index eea9b87..e8bb768 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = copysignf(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s copysignf(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index ff0c3b7..9442a17 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = copysignl(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s copysignl(%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 118cdb5..022cb9b 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = fabs(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fabs(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 9502560..cef9b5a 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = fabsf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fabsf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index ef75ced..3634895 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                y = fabsl(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fabsl(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 9f4eeea..9ce8086 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = fdim(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fdim(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 55dc1dc..6dd9704 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = fdimf(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fdimf(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index e08e27e..5a27042 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = fdiml(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fdiml(%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index ac5ecc8..ca715dc 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = floor(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s floor(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 1452f7f..ca3bf0c 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = floorf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s floorf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 9681e6d..644724e 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                y = floorl(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s floorl(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index cdd4cc3..24b65c8 100644 (file)
@@ -25,7 +25,12 @@ int main(void)
                y = fma(p->x, p->x2, p->x3);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               /* do not check inexact by default */
+#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION
+               if (!checkexceptall(e, p->e, p->r)) {
+#else
+               if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) {
+#endif
                        printf("%s:%d: bad fp exception: %s fma(%a,%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 288bd32..c4329a2 100644 (file)
@@ -25,7 +25,12 @@ int main(void)
                y = fmaf(p->x, p->x2, p->x3);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               /* do not check inexact by default */
+#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION
+               if (!checkexceptall(e, p->e, p->r)) {
+#else
+               if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) {
+#endif
                        printf("%s:%d: bad fp exception: %s fmaf(%a,%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 1f67aa4..791d5d3 100644 (file)
@@ -30,7 +30,12 @@ int main(void)
                y = fmal(p->x, p->x2, p->x3);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               /* do not check inexact by default */
+#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION
+               if (!checkexceptall(e, p->e, p->r)) {
+#else
+               if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) {
+#endif
                        printf("%s:%d: bad fp exception: %s fmal(%La,%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 3492893..b5a6b7a 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = fmax(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fmax(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 8d787ed..cadc356 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = fmaxf(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fmaxf(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 1c6e42a..1856dcd 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = fmaxl(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fmaxl(%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 1ee3f4c..fb022c0 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = fmin(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fmin(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index c86569a..1bb1afa 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = fminf(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fminf(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 91f3e87..da7a047 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = fminl(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s fminl(%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 88d2571..5ba58ff 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = frexp(p->x, &yi);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s frexp(%a)=%a,%lld, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, p->i, estr(p->e));
                        printf(" got %s\n", estr(e));
index 33e1405..35dc913 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = frexpf(p->x, &yi);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s frexpf(%a)=%a,%lld, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, p->i, estr(p->e));
                        printf(" got %s\n", estr(e));
index 9608504..a0cb1b8 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                y = frexpl(p->x, &yi);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s frexpl(%La)=%La,%lld, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, p->i, estr(p->e));
                        printf(" got %s\n", estr(e));
index dcf73cc..93e92c2 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = ldexp(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s ldexp(%a, %lld)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 4a1b742..135e957 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = ldexpf(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s ldexpf(%a, %lld)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 8aa6a22..b04ef45 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = ldexpl(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s ldexpl(%La, %lld)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 505d402..8d8a20f 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = logb(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s logb(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 076ab26..4f0f0d0 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = logbf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s logbf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 7792b78..8a774c7 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = logbl(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s logbl(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 5352a77..c0ce9d8 100644 (file)
@@ -25,7 +25,7 @@ int main(void)
                y = modf(p->x, &yi);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s modf(%a)=%a,%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, p->y2, estr(p->e));
                        printf(" got %s\n", estr(e));
index dfdd3ab..d599f9f 100644 (file)
@@ -25,7 +25,7 @@ int main(void)
                y = modff(p->x, &yi);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s modff(%a)=%a,%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, p->y2, estr(p->e));
                        printf(" got %s\n", estr(e));
index 84abdcd..5a19e83 100644 (file)
@@ -30,7 +30,7 @@ int main(void)
                y = modfl(p->x, &yi);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s modf(%La)=%La,%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, p->y2, estr(p->e));
                        printf(" got %s\n", estr(e));
index 675e77c..1702097 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = nearbyint(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nearbyint(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index a894548..1bd3db9 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = nearbyintf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nearbyintf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 0d62313..854255a 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = nearbyintl(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nearbyintl(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 576a392..79667fe 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = nextafter(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nextafter(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 822a9b6..18cd8bd 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = nextafterf(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nextafterf(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 327258d..41edab0 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = nextafterl(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nextafterl(%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index ebf395c..8436c69 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                y = nexttoward(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nexttoward(%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index b026bd1..0cbed2f 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                y = nexttowardf(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nexttowardf(%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index f9250e1..ac0115a 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = nexttowardl(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s nexttowardl(%La,%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 54c7df1..4ff50eb 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = rint(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s rint(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index e64fa1e..ced880d 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = rintf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s rintf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 0079a1b..2970eb3 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = rintl(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s rintl(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 65a98fe..c7b8766 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = round(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s round(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 3af83f1..d61762f 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = roundf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s roundf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 8473dda..53eda20 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = roundl(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s roundl(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index b1ea51e..901b20c 100644 (file)
@@ -28,7 +28,7 @@ int main(void)
                y = scalb(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s scalb(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index c249153..309ff8d 100644 (file)
@@ -28,7 +28,7 @@ int main(void)
                y = scalbf(p->x, p->x2);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s scalbf(%a,%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 4aa3f99..6e24b37 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = scalbln(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s scalbln(%a, %lld)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index e507582..ab19cf2 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = scalblnf(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s scalblnf(%a, %lld)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index bf07c16..2492483 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = scalblnl(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s scalblnl(%La, %lld)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 4d17985..9b664dc 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = scalbn(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s scalbn(%a, %lld)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 99c748b..69709a1 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = scalbnf(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s scalbnf(%a, %lld)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 758b2af..9bc7bf5 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = scalbnl(p->x, p->i);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s scalbnl(%La, %lld)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 0c5a2d0..058736f 100644 (file)
@@ -24,3 +24,5 @@ T(RN,                     inf,                     inf,    0x1.921fb54442d18p-1,
 T(RN,                     inf,                    -inf,    0x1.2d97c7f3321d2p+1,  -0x1.a79394p-3, INEXACT)
 T(RN,                    -inf,                     inf,   -0x1.921fb54442d18p-1,   0x1.1a6264p-2, INEXACT)
 T(RN,                    -inf,                    -inf,   -0x1.2d97c7f3321d2p+1,   0x1.a79394p-3, INEXACT)
+T(RN,               0x1p-1023,                  0x1p+0,               0x1p-1023,          0x0p+0, INEXACT|UNDERFLOW)
+T(RN,                  0x1p+0,               0x1p+1023,               0x1p-1023,          0x0p+0, INEXACT|UNDERFLOW)
index 47421ec..1dc1d85 100644 (file)
@@ -24,3 +24,5 @@ T(RN,             inf,             inf,   0x1.921fb6p-1,   0x1.777a5cp-2, INEXAC
 T(RN,             inf,            -inf,   0x1.2d97c8p+1,   0x1.99bc5cp-6, INEXACT)
 T(RN,            -inf,             inf,  -0x1.921fb6p-1,  -0x1.777a5cp-2, INEXACT)
 T(RN,            -inf,            -inf,  -0x1.2d97c8p+1,  -0x1.99bc5cp-6, INEXACT)
+T(RN,        0x1p-127,          0x1p+0,        0x1p-127,          0x0p+0, INEXACT|UNDERFLOW)
+T(RN,          0x1p+0,        0x1p+127,        0x1p-127,          0x0p+0, INEXACT|UNDERFLOW)
index 42ae863..74113be 100644 (file)
@@ -24,3 +24,5 @@ T(RN,                            inf,                            inf,       0x1.
 T(RN,                            inf,                           -inf,        0x1.2d97c7f3321d235p+1L,   0x1.b1acd8p-2, INEXACT)
 T(RN,                           -inf,                            inf,      -0x1.921fb54442d1846ap-1L,  -0x1.d9ccecp-3, INEXACT)
 T(RN,                           -inf,                           -inf,       -0x1.2d97c7f3321d235p+1L,  -0x1.b1acd8p-2, INEXACT)
+T(RN,                    0x1p-16383L,                        0x1p+0L,                    0x1p-16383L,          0x0p+0, INEXACT|UNDERFLOW)
+T(RN,                        0x1p+0L,                    0x1p+16383L,                    0x1p-16383L,          0x0p+0, INEXACT|UNDERFLOW)
index e0d3ff9..5588ceb 100644 (file)
@@ -5,3 +5,5 @@ T(RN,                 -0x1p+0,   -0x1.43a54e4e98864p-1,   0x1.ca8a42p-4, INEXACT
 T(RN,                     inf,                     inf,          0x0p+0, 0)
 T(RN,                    -inf,                 -0x1p+0,          0x0p+0, 0)
 T(RN,                     nan,                     nan,          0x0p+0, 0)
+T(RN, 0x1.ffffffffffffep-1023, 0x1.ffffffffffffep-1023,          0x0p+0, INEXACT|UNDERFLOW)
+T(RN,-0x1.ffffffffffffep-1023,-0x1.ffffffffffffep-1023,          0x0p+0, INEXACT|UNDERFLOW)
index 4fc4ff7..2761e8e 100644 (file)
@@ -6,3 +6,4 @@ T(RN,         -0x1p+0,            -inf,          0x0p+0, DIVBYZERO)
 T(RN,             inf,             inf,          0x0p+0, 0)
 T(RN,            -inf,             nan,          0x0p+0, INVALID)
 T(RN,             nan,             nan,          0x0p+0, 0)
+T(RN,-0x1.fffffcp-127,-0x1.fffffcp-127,        0x1p-104, INEXACT|UNDERFLOW)
index fed7899..8af17c4 100644 (file)
@@ -11,7 +11,7 @@ T(RN,                  0x0p+0,                 -0x1p+0,                     inf,
 T(RN,                  0x0p+0,                 -0x1p+1,                     inf,          0x0p+0, DIVBYZERO)
 T(RN,                  0x0p+0,               -0x1.8p+1,                     inf,          0x0p+0, DIVBYZERO)
 T(RN,                  0x0p+0,                 -0x1p+2,                     inf,          0x0p+0, DIVBYZERO)
-T(RN,                  0x0p+0,                    -inf,                     inf,          0x0p+0, 0)
+T(RN,                  0x0p+0,                    -inf,                     inf,          0x0p+0, DIVBYZERO)
 T(RN,                 -0x0p+0,                     nan,                     nan,          0x0p+0, 0)
 T(RN,                 -0x0p+0,                     inf,                  0x0p+0,          0x0p+0, 0)
 T(RN,                 -0x0p+0,                0x1.8p+1,                 -0x0p+0,          0x0p+0, 0)
@@ -25,7 +25,7 @@ T(RN,                 -0x0p+0,                 -0x1p+0,                    -inf,
 T(RN,                 -0x0p+0,                 -0x1p+1,                     inf,          0x0p+0, DIVBYZERO)
 T(RN,                 -0x0p+0,               -0x1.8p+1,                    -inf,          0x0p+0, DIVBYZERO)
 T(RN,                 -0x0p+0,                 -0x1p+2,                     inf,          0x0p+0, DIVBYZERO)
-T(RN,                 -0x0p+0,                    -inf,                     inf,          0x0p+0, 0)
+T(RN,                 -0x0p+0,                    -inf,                     inf,          0x0p+0, DIVBYZERO)
 T(RN,                     nan,                  0x0p+0,                  0x1p+0,          0x0p+0, 0)
 T(RN,                     inf,                  0x0p+0,                  0x1p+0,          0x0p+0, 0)
 T(RN,                    -inf,                  0x0p+0,                  0x1p+0,          0x0p+0, 0)
index 8c7d72d..bec842d 100644 (file)
@@ -11,7 +11,7 @@ T(RN,          0x0p+0,         -0x1p+0,             inf,          0x0p+0, DIVBYZ
 T(RN,          0x0p+0,         -0x1p+1,             inf,          0x0p+0, DIVBYZERO)
 T(RN,          0x0p+0,       -0x1.8p+1,             inf,          0x0p+0, DIVBYZERO)
 T(RN,          0x0p+0,         -0x1p+2,             inf,          0x0p+0, DIVBYZERO)
-T(RN,          0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RN,          0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RN,         -0x0p+0,             nan,             nan,          0x0p+0, 0)
 T(RN,         -0x0p+0,             inf,          0x0p+0,          0x0p+0, 0)
 T(RN,         -0x0p+0,        0x1.8p+1,         -0x0p+0,          0x0p+0, 0)
@@ -25,7 +25,7 @@ T(RN,         -0x0p+0,         -0x1p+0,            -inf,          0x0p+0, DIVBYZ
 T(RN,         -0x0p+0,         -0x1p+1,             inf,          0x0p+0, DIVBYZERO)
 T(RN,         -0x0p+0,       -0x1.8p+1,            -inf,          0x0p+0, DIVBYZERO)
 T(RN,         -0x0p+0,         -0x1p+2,             inf,          0x0p+0, DIVBYZERO)
-T(RN,         -0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RN,         -0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RN,             nan,          0x0p+0,          0x1p+0,          0x0p+0, 0)
 T(RN,             inf,          0x0p+0,          0x1p+0,          0x0p+0, 0)
 T(RN,            -inf,          0x0p+0,          0x1p+0,          0x0p+0, 0)
index c0e914c..2e613c0 100644 (file)
@@ -11,7 +11,7 @@ T(RN,                        0x0p+0L,                       -0x1p+0L,
 T(RN,                        0x0p+0L,                       -0x1p+1L,                            inf,          0x0p+0, DIVBYZERO)
 T(RN,                        0x0p+0L,                     -0x1.8p+1L,                            inf,          0x0p+0, DIVBYZERO)
 T(RN,                        0x0p+0L,                       -0x1p+2L,                            inf,          0x0p+0, DIVBYZERO)
-T(RN,                        0x0p+0L,                           -inf,                            inf,          0x0p+0, 0)
+T(RN,                        0x0p+0L,                           -inf,                            inf,          0x0p+0, DIVBYZERO)
 T(RN,                       -0x0p+0L,                            nan,                            nan,          0x0p+0, 0)
 T(RN,                       -0x0p+0L,                            inf,                        0x0p+0L,          0x0p+0, 0)
 T(RN,                       -0x0p+0L,                      0x1.8p+1L,                       -0x0p+0L,          0x0p+0, 0)
@@ -25,7 +25,7 @@ T(RN,                       -0x0p+0L,                       -0x1p+0L,
 T(RN,                       -0x0p+0L,                       -0x1p+1L,                            inf,          0x0p+0, DIVBYZERO)
 T(RN,                       -0x0p+0L,                     -0x1.8p+1L,                           -inf,          0x0p+0, DIVBYZERO)
 T(RN,                       -0x0p+0L,                       -0x1p+2L,                            inf,          0x0p+0, DIVBYZERO)
-T(RN,                       -0x0p+0L,                           -inf,                            inf,          0x0p+0, 0)
+T(RN,                       -0x0p+0L,                           -inf,                            inf,          0x0p+0, DIVBYZERO)
 T(RN,                            nan,                        0x0p+0L,                        0x1p+0L,          0x0p+0, 0)
 T(RN,                            inf,                        0x0p+0L,                        0x1p+0L,          0x0p+0, 0)
 T(RN,                           -inf,                        0x0p+0L,                        0x1p+0L,          0x0p+0, 0)
index 54be6ec..150c435 100644 (file)
@@ -64,3 +64,4 @@ T(RN,                0x1.cp+0,                  0x1p-1,                 -0x1p-2,
 T(RN,               -0x1.cp+0,                  0x1p-1,                  0x1p-2,          0x0p+0, 0)
 T(RN,                0x1.cp+0,                 -0x1p-1,                 -0x1p-2,          0x0p+0, 0)
 T(RN,               -0x1.cp+0,                 -0x1p-1,                  0x1p-2,          0x0p+0, 0)
+T(RN,               0x1p-1070,                     inf,               0x1p-1070,          0x0p+0, 0)
index 074a15d..28a8cfd 100644 (file)
@@ -64,3 +64,4 @@ T(RN,        0x1.cp+0,          0x1p-1,         -0x1p-2,          0x0p+0, 0)
 T(RN,       -0x1.cp+0,          0x1p-1,          0x1p-2,          0x0p+0, 0)
 T(RN,        0x1.cp+0,         -0x1p-1,         -0x1p-2,          0x0p+0, 0)
 T(RN,       -0x1.cp+0,         -0x1p-1,          0x1p-2,          0x0p+0, 0)
+T(RN,       0x1p-127,              inf,        0x1p-127,          0x0p+0, 0)
index 5667518..408f200 100644 (file)
@@ -64,3 +64,4 @@ T(RN,                      0x1.cp+0L,                        0x1p-1L,
 T(RN,                     -0x1.cp+0L,                        0x1p-1L,                        0x1p-2L,          0x0p+0, 0)
 T(RN,                      0x1.cp+0L,                       -0x1p-1L,                       -0x1p-2L,          0x0p+0, 0)
 T(RN,                     -0x1.cp+0L,                       -0x1p-1L,                        0x1p-2L,          0x0p+0, 0)
+T(RN,                    0x1p-16383L,                            inf,                    0x1p-16383L,          0x0p+0, 0)
index 1c0d502..403e2dc 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = sqrt(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s sqrt(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index d29cc57..8e8f8fe 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
                y = sqrtf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s sqrtf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 6329a3e..ab59cc8 100644 (file)
@@ -33,7 +33,7 @@ int main(void)
                y = sqrtl(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s sqrtl(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 3b20db7..377118c 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = trunc(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s trunc(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 1193623..94825d9 100644 (file)
@@ -26,7 +26,7 @@ int main(void)
                y = truncf(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s truncf(%a)=%a, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 162d918..98d5197 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
                y = truncl(p->x);
                e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
 
-               if (!checkexcept(e, p->e, p->r)) {
+               if (!checkexceptall(e, p->e, p->r)) {
                        printf("%s:%d: bad fp exception: %s truncl(%La)=%La, want %s",
                                p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
                        printf(" got %s\n", estr(e));
index 04ea84a..05afcf5 100644 (file)
@@ -143,10 +143,10 @@ T(RN,                 -0x0p+0,                     inf,                  0x0p+0,
 // +-(|x| < 1) **  -inf is +inf
 T(RN,    0x1.fffffffffffffp-1,                    -inf,                     inf,          0x0p+0, 0)
 T(RN,               0x1p-1074,                    -inf,                     inf,          0x0p+0, 0)
-T(RN,                  0x0p+0,                    -inf,                     inf,          0x0p+0, 0)
+T(RN,                  0x0p+0,                    -inf,                     inf,          0x0p+0, DIVBYZERO)
 T(RN,   -0x1.fffffffffffffp-1,                    -inf,                     inf,          0x0p+0, 0)
 T(RN,              -0x1p-1074,                    -inf,                     inf,          0x0p+0, 0)
-T(RN,                 -0x0p+0,                    -inf,                     inf,          0x0p+0, 0)
+T(RN,                 -0x0p+0,                    -inf,                     inf,          0x0p+0, DIVBYZERO)
 // +1 ** (anthing) is +1
 T(RN,                  0x1p+0,                     nan,                  0x1p+0,          0x0p+0, 0)
 T(RN,                  0x1p+0,                     inf,                  0x1p+0,          0x0p+0, 0)
index c0d7747..d9e00db 100644 (file)
@@ -277,28 +277,28 @@ T(RD,         -0x0p+0,             inf,          0x0p+0,          0x0p+0, 0)
 // +-(|x| < 1) **  -inf is +inf
 T(RN,   0x1.fffffep-1,            -inf,             inf,          0x0p+0, 0)
 T(RN,        0x1p-149,            -inf,             inf,          0x0p+0, 0)
-T(RN,          0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RN,          0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RN,  -0x1.fffffep-1,            -inf,             inf,          0x0p+0, 0)
 T(RN,       -0x1p-149,            -inf,             inf,          0x0p+0, 0)
-T(RN,         -0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RN,         -0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RZ,   0x1.fffffep-1,            -inf,             inf,          0x0p+0, 0)
 T(RZ,        0x1p-149,            -inf,             inf,          0x0p+0, 0)
-T(RZ,          0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RZ,          0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RZ,  -0x1.fffffep-1,            -inf,             inf,          0x0p+0, 0)
 T(RZ,       -0x1p-149,            -inf,             inf,          0x0p+0, 0)
-T(RZ,         -0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RZ,         -0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RU,   0x1.fffffep-1,            -inf,             inf,          0x0p+0, 0)
 T(RU,        0x1p-149,            -inf,             inf,          0x0p+0, 0)
-T(RU,          0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RU,          0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RU,  -0x1.fffffep-1,            -inf,             inf,          0x0p+0, 0)
 T(RU,       -0x1p-149,            -inf,             inf,          0x0p+0, 0)
-T(RU,         -0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RU,         -0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RD,   0x1.fffffep-1,            -inf,             inf,          0x0p+0, 0)
 T(RD,        0x1p-149,            -inf,             inf,          0x0p+0, 0)
-T(RD,          0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RD,          0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 T(RD,  -0x1.fffffep-1,            -inf,             inf,          0x0p+0, 0)
 T(RD,       -0x1p-149,            -inf,             inf,          0x0p+0, 0)
-T(RD,         -0x0p+0,            -inf,             inf,          0x0p+0, 0)
+T(RD,         -0x0p+0,            -inf,             inf,          0x0p+0, DIVBYZERO)
 // +-1         ** +-inf is +1
 T(RN,          0x1p+0,             inf,          0x1p+0,          0x0p+0, 0)
 T(RN,          0x1p+0,            -inf,          0x1p+0,          0x0p+0, 0)