3 float nextafterf(float x, float y)
5 union {float f; uint32_t i;} ux={x}, uy={y};
8 if (isnan(x) || isnan(y))
12 ax = ux.i & 0x7fffffff;
13 ay = uy.i & 0x7fffffff;
17 ux.i = (uy.i & 0x80000000) | 1;
18 } else if (ax > ay || ((ux.i ^ uy.i) & 0x80000000))
22 e = ux.i & 0x7f800000;
23 /* raise overflow if ux.f is infinite and x is finite */
26 /* raise underflow if ux.f is subnormal or zero */
28 FORCE_EVAL(x*x + ux.f*ux.f);