86 static const double one = 1.0, tiny=1.0e-300;
88 static double one = 1.0, tiny=1.0e-300;
99 int sign = (int)0x80000000;
100 unsigned r,
t1,s1,ix1,q1;
107 if((ix0&0x7ff00000)==0x7ff00000) {
113 if(((ix0&(~sign))|ix1)==0)
return x;
122 ix0 |= (ix1>>11); ix1 <<= 21;
124 for(i=0;(ix0&0x00100000)==0;i++) ix0<<=1;
126 ix0 |= (ix1>>(32-i));
130 ix0 = (ix0&0x000fffff)|0x00100000;
132 ix0 += ix0 + ((ix1&sign)>>31);
138 ix0 += ix0 + ((ix1&sign)>>31);
140 q = q1 = s0 = s1 = 0;
150 ix0 += ix0 + ((ix1&sign)>>31);
159 if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
161 if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
163 if (ix1 < t1) ix0 -= 1;
167 ix0 += ix0 + ((ix1&sign)>>31);
177 if (q1==(
unsigned)0xffffffff) { q1=0; q += 1;}
179 if (q1==(
unsigned)0xfffffffe) q+=1;
185 ix0 = (q>>1)+0x3fe00000;
187 if ((q&1)==1) ix1 |= sign;