Support for MSVC compiler: Avoid division by a literal 0.
[gnulib.git] / tests / test-frexp.c
index 4ed24d2..a7ec639 100644 (file)
@@ -27,6 +27,7 @@ SIGNATURE_CHECK (frexp, double, (double, int *));
 
 #include "isnand-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
 #include "nan.h"
 #include "macros.h"
 
@@ -67,7 +68,7 @@ main ()
   { /* Positive infinity.  */
     int exp = -9999;
     double mantissa;
-    x = 1.0 / 0.0;
+    x = Infinityd ();
     mantissa = frexp (x, &exp);
     ASSERT (mantissa == x);
   }
@@ -75,7 +76,7 @@ main ()
   { /* Negative infinity.  */
     int exp = -9999;
     double mantissa;
-    x = -1.0 / 0.0;
+    x = - Infinityd ();
     mantissa = frexp (x, &exp);
     ASSERT (mantissa == x);
   }