3 #define SIGN ((uint64_t)1<<63)
5 double nextafter(double x, double y)
11 if (isnan(x) || isnan(y))
15 if (ux.bits == uy.bits)
22 ux.bits = (uy.bits & SIGN) | 1;
23 } else if (ax > ay || ((ux.bits ^ uy.bits) & SIGN))
27 e = ux.bits >> 52 & 0x7ff;
28 /* raise overflow if ux.value is infinite and x is finite */
31 /* raise underflow if ux.value is subnormal or zero */
33 FORCE_EVAL(x*x + ux.value*ux.value);