Comment.
[gnulib.git] / tests / test-frexpl.c
index 148a27f..f98bf51 100644 (file)
@@ -29,6 +29,7 @@
 
 /* Avoid some warnings from "gcc -Wshadow".
    This file doesn't use the exp() function.  */
+#undef exp
 #define exp exponent
 
 #define ASSERT(expr) \
 # define MIN_NORMAL_EXP LDBL_MIN_EXP
 #endif
 
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+   So we use minus_zero instead.  */
+long double minus_zero = -LDBL_MIN * LDBL_MIN;
+
 static long double
 my_ldexp (long double x, int d)
 {
@@ -112,7 +117,7 @@ main ()
   { /* Negative zero.  */
     int exp = -9999;
     long double mantissa;
-    x = -0.0L;
+    x = minus_zero;
     mantissa = frexpl (x, &exp);
     ASSERT (exp == 0);
     ASSERT (mantissa == x);