fix typos in mathl
[gnulib.git] / tests / test-frexp.c
index cb80f56..c08056c 100644 (file)
 #include <stdlib.h>
 
 #include "isnand.h"
+#include "nan.h"
+
+/* Avoid some warnings from "gcc -Wshadow".
+   This file doesn't use the exp() function.  */
+#undef exp
+#define exp exponent
 
 #define ASSERT(expr) \
   do                                                                        \
@@ -32,6 +38,7 @@
       if (!(expr))                                                          \
         {                                                                   \
           fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+          fflush (stderr);                                                  \
           abort ();                                                         \
         }                                                                   \
     }                                                                       \
@@ -61,7 +68,7 @@ main ()
   { /* NaN.  */
     int exp = -9999;
     double mantissa;
-    x = NAN;
+    x = NaNd ();
     mantissa = frexp (x, &exp);
     ASSERT (isnand (mantissa));
   }