X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-frexpl.c;h=f1446fe07d4663a6110847474372f3dcb1c42611;hb=a717329a5e25e6bf44f18d695f1bf8516de2292e;hp=fd2c7e07926cd52982108cd5523915b13bb82678;hpb=5d7e7dd737c62fe09ce0d083810a502209dc5e80;p=gnulib.git diff --git a/tests/test-frexpl.c b/tests/test-frexpl.c index fd2c7e079..f1446fe07 100644 --- a/tests/test-frexpl.c +++ b/tests/test-frexpl.c @@ -22,18 +22,32 @@ #include #include +#include #include #include "fpucw.h" #include "isnanl-nolibm.h" -#define ASSERT(expr) if (!(expr)) abort (); +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) /* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable - exponent for 'long double' is -964. For exponents below that, the - precision may be truncated to the precision used for 'double'. */ + exponent for 'long double' is -964. Similarly, on PowerPC machines, + LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' + is -968. For exponents below that, the precision may be truncated to the + precision used for 'double'. */ #ifdef __sgi # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57) +#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__ +# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53) #else # define MIN_NORMAL_EXP LDBL_MIN_EXP #endif