39 #ifdef POK_NEEDS_LIBMATH
42 #include "math_private.h"
44 static const double one = 1.0;
47 modf(
double x,
double *iptr)
51 EXTRACT_WORDS(i0,i1,x);
52 jj0 = (((uint32_t)i0>>20)&0x7ff)-0x3ff;
55 INSERT_WORDS(*iptr,i0&0x80000000,0);
58 i = (0x000fffff)>>jj0;
62 GET_HIGH_WORD(high,x);
63 INSERT_WORDS(x,high&0x80000000,0);
66 INSERT_WORDS(*iptr,i0&(~i),0);
73 GET_HIGH_WORD(high,x);
74 INSERT_WORDS(x,high&0x80000000,0);
77 i = ((uint32_t)(0xffffffff))>>(jj0-20);
81 GET_HIGH_WORD(high,x);
82 INSERT_WORDS(x,high&0x80000000,0);
85 INSERT_WORDS(*iptr,i0,i1&(~i));