/* 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)
{
{ /* Negative zero. */
int exp = -9999;
long double mantissa;
- x = -0.0L;
+ x = minus_zero;
mantissa = frexpl (x, &exp);
ASSERT (exp == 0);
ASSERT (mantissa == x);