38 #ifdef POK_NEEDS_LIBMATH
40 #include "math_private.h"
42 static const float one = 1.0, Zero[] = {0.0, -0.0,};
45 __ieee754_fmodf(
float x,
float y)
47 int32_t n,hx,hy,hz,ix,iy,sx,i;
56 if(hy==0||(hx>=0x7f800000)||
61 return Zero[(uint32_t)sx>>31];
65 for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1;
66 }
else ix = (hx>>23)-127;
70 for (iy = -126,i=(hy<<8); i>=0; i<<=1) iy -=1;
71 }
else iy = (hy>>23)-127;
75 hx = 0x00800000|(0x007fffff&hx);
81 hy = 0x00800000|(0x007fffff&hy);
94 return Zero[(uint32_t)sx>>31];
103 return Zero[(uint32_t)sx>>31];
104 while(hx<0x00800000) {
109 hx = ((hx-0x00800000)|((iy+127)<<23));
110 SET_FLOAT_WORD(x,hx|sx);
114 SET_FLOAT_WORD(x,hx|sx);