Lines Matching +full:0 +full:- +full:1023
1 /*-
17 static const double Zero[] = {0.0, -0.0,};
23 * a side-effect of computing the remainder by the shift and subtract
35 sxy = (hx ^ hy) & 0x80000000; in remquo()
36 sx = hx&0x80000000; /* sign of x */ in remquo()
38 hy &= 0x7fffffff; /* |y| */ in remquo()
41 if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ in remquo()
42 ((hy|((ly|-ly)>>31))>0x7ff00000)) /* or y is NaN */ in remquo()
46 q = 0; in remquo()
47 goto fixup; /* |x|<|y| return x or x-y */ in remquo()
50 *quo = (sxy ? -1 : 1); in remquo()
51 return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ in remquo()
56 if(hx<0x00100000) in remquo()
59 ix = (hx>>20)-1023; in remquo()
62 if(hy<0x00100000) in remquo()
65 iy = (hy>>20)-1023; in remquo()
68 if(ix >= -1022) in remquo()
69 hx = 0x00100000|(0x000fffff&hx); in remquo()
71 n = -1022-ix; in remquo()
73 hx = (hx<<n)|(lx>>(32-n)); in remquo()
76 hx = lx<<(n-32); in remquo()
77 lx = 0; in remquo()
80 if(iy >= -1022) in remquo()
81 hy = 0x00100000|(0x000fffff&hy); in remquo()
83 n = -1022-iy; in remquo()
85 hy = (hy<<n)|(ly>>(32-n)); in remquo()
88 hy = ly<<(n-32); in remquo()
89 ly = 0; in remquo()
94 n = ix - iy; in remquo()
95 q = 0; in remquo()
96 while(n--) { in remquo()
97 hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1; in remquo()
98 if(hz<0){hx = hx+hx+(lx>>31); lx = lx+lx;} in remquo()
102 hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1; in remquo()
103 if(hz>=0) {hx=hz;lx=lz;q++;} in remquo()
106 if((hx|lx)==0) { /* return sign(x)*0 */ in remquo()
107 q &= 0x7fffffff; in remquo()
108 *quo = (sxy ? -q : q); in remquo()
111 while(hx<0x00100000) { /* normalize x */ in remquo()
113 iy -= 1; in remquo()
115 if(iy>= -1022) { /* normalize output */ in remquo()
116 hx = ((hx-0x00100000)|((iy+1023)<<20)); in remquo()
118 n = -1022 - iy; in remquo()
120 lx = (lx>>n)|((u_int32_t)hx<<(32-n)); in remquo()
123 lx = (hx<<(32-n))|(lx>>n); hx = 0; in remquo()
125 lx = hx>>(n-32); hx = 0; in remquo()
131 if (y < 0x1p-1021) { in remquo()
134 x-=y; in remquo()
138 x-=y; in remquo()
142 q &= 0x7fffffff; in remquo()
143 *quo = (sxy ? -q : q); in remquo()