5 union {double f; uint64_t i;} u = {x};
6 int e = u.i >> 52 & 0x7ff;
9 if (e >= 0x3ff+52 || x == 0)
11 /* y = int(x) - x, where int(x) is an integer neighbor of x */
13 y = (double)(x - 0x1p52) + 0x1p52 - x;
15 y = (double)(x + 0x1p52) - 0x1p52 - x;
16 /* special case because of non-nearest rounding modes */
19 return u.i >> 63 ? -1 : 0;