#define MANL_SHIFT (LDBL_MANL_SIZE - 1)
-static const long double Zero[] = {0.0L, -0.0L};
+static const long double Zero[] = {0.0, -0.0};
/*
* Return the IEEE remainder and set *quo to the last n bits of the
goto fixup; /* |x|<|y| return x or x-y */
}
if (ux.bits.manh == uy.bits.manh && ux.bits.manl == uy.bits.manl) {
- *quo = 1;
+ *quo = sxy ? -1 : 1;
return Zero[sx]; /* |x|=|y| return x*0*/
}
}
/* convert back to floating value and restore the sign */
if ((hx|lx) == 0) { /* return sign(x)*0 */
+ q &= 0x7fffffff;
*quo = sxy ? -q : q;
return Zero[sx];
}