4 float fmodf(float x, float y)
6 union {float f; uint32_t i;} ux = {x}, uy = {y};
7 int ex = ux.i>>23 & 0xff;
8 int ey = uy.i>>23 & 0xff;
9 uint32_t sx = ux.i & 0x80000000;
13 if (uy.i<<1 == 0 || isnan(y) || ex == 0xff)
15 if (uxi<<1 <= uy.i<<1) {
16 if (uxi<<1 == uy.i<<1)
21 /* normalize x and y */
23 for (i = uxi<<9; i>>31 == 0; ex--, i <<= 1);
30 for (i = uy.i<<9; i>>31 == 0; ey--, i <<= 1);
38 for (; ex > ey; ex--) {
53 for (; uxi>>23 == 0; uxi <<= 1, ex--);
58 uxi |= (uint32_t)ex << 23;