/bionic/tests/ |
D | inttypes_test.cpp | 191 div_t r; in TEST() local 193 r = div(5, 3); in TEST() 194 EXPECT_EQ(1, r.quot); in TEST() 195 EXPECT_EQ(2, r.rem); in TEST() 197 r = div(5, -3); in TEST() 198 EXPECT_EQ(-1, r.quot); in TEST() 199 EXPECT_EQ(2, r.rem); in TEST() 201 r = div(-5, 3); in TEST() 202 EXPECT_EQ(-1, r.quot); in TEST() 203 EXPECT_EQ(-2, r.rem); in TEST() [all …]
|
D | sys_select_test.cpp | 78 fd_set r; in TEST() local 79 FD_ZERO(&r); in TEST() 85 FD_SET(STDIN_FILENO, &r); in TEST() 92 ASSERT_EQ(-1, select(-1, &r, &w, &e, nullptr)); in TEST() 95 int num_fds = select(max, &r, &w, &e, nullptr); in TEST() 103 ASSERT_TRUE(FD_ISSET(STDIN_FILENO, &r)); in TEST() 110 ASSERT_EQ(-1, select(max, &r, &w, &e, &tv)); in TEST() 118 FD_ZERO(&r); in TEST() 119 FD_SET(fd, &r); in TEST() 120 ASSERT_EQ(1, select(fd+1, &r, nullptr, nullptr, &tv)); in TEST() [all …]
|
/bionic/libc/bionic/ |
D | wchar.cpp | 71 size_t i, o, r; in mbsnrtowcs() local 82 for (i = o = 0; i < nmc; i += r, o++) { in mbsnrtowcs() 88 r = 1; in mbsnrtowcs() 90 r = mbrtowc(nullptr, *src + i, nmc - i, state); in mbsnrtowcs() 91 if (r == __MB_ERR_ILLEGAL_SEQUENCE) { in mbsnrtowcs() 94 if (r == __MB_ERR_INCOMPLETE_SEQUENCE) { in mbsnrtowcs() 97 if (r == 0) { in mbsnrtowcs() 106 for (i = o = 0; i < nmc && o < len; i += r, o++) { in mbsnrtowcs() 110 r = 1; in mbsnrtowcs() 116 r = mbrtowc(dst + o, *src + i, nmc - i, state); in mbsnrtowcs() [all …]
|
/bionic/libm/upstream-freebsd/lib/msun/bsdsrc/ |
D | b_tgamma.c | 191 struct Double yy, r; local 198 r.a = y; 199 TRUNC(r.a); 200 yy.a = r.a - one; 202 yy.b = r.b = y - yy.a; 205 t = r.a*yy.a; 206 r.b = r.a*yy.b + y*r.b; 207 r.a = t; 208 TRUNC(r.a); 209 r.b += (t - r.a); [all …]
|
/bionic/libc/upstream-netbsd/lib/libc/regex/ |
D | regerror.c | 168 const struct rerr *r; in regerror() local 180 for (r = rerrs; r->code != 0; r++) in regerror() 181 if (r->code == target) in regerror() 185 if (r->code != 0) { in regerror() 186 (void)strlcpy(convbuf, r->name, sizeof convbuf); in regerror() 192 s = r->explain; in regerror() 213 const struct rerr *r; in regatoi() local 215 for (r = rerrs; r->code != 0; r++) in regatoi() 216 if (strcmp(r->name, preg->re_endp) == 0) in regatoi() 218 if (r->code == 0) in regatoi() [all …]
|
/bionic/libm/upstream-freebsd/lib/msun/src/ |
D | s_cbrt.c | 45 double r,s,t=0.0,w; in cbrt() local 89 r=(t*t)*(t/x); in cbrt() 90 t=t*((P0+r*(P1+r*P2))+((r*r)*r)*(P3+r*P4)); in cbrt() 108 r=x/s; /* error <= 0.5 ulps; |r| < |t| */ in cbrt() 110 r=(r-t)/(w+r); /* r-t is exact; w+r ~= 3*t */ in cbrt() 111 t=t+t*r; /* error <= 0.5 + 0.5/3 + epsilon */ in cbrt()
|
D | e_sqrt.c | 100 u_int32_t r,t1,s1,ix1,q1; in __ieee754_sqrt() local 139 r = 0x00200000; /* r = moving bit from right to left */ in __ieee754_sqrt() 141 while(r!=0) { in __ieee754_sqrt() 142 t = s0+r; in __ieee754_sqrt() 144 s0 = t+r; in __ieee754_sqrt() 146 q += r; in __ieee754_sqrt() 150 r>>=1; in __ieee754_sqrt() 153 r = sign; in __ieee754_sqrt() 154 while(r!=0) { in __ieee754_sqrt() 155 t1 = s1+r; in __ieee754_sqrt() [all …]
|
D | s_cbrtf.c | 33 double r,T; in cbrtf() local 61 r=T*T*T; in cbrtf() 62 T=T*((double)x+x+r)/(x+r+r); in cbrtf() 68 r=T*T*T; in cbrtf() 69 T=T*((double)x+x+r)/(x+r+r); in cbrtf()
|
D | k_sincosl.h | 54 long double hz, r, v, w, z; in __kernel_sincosl() local 62 r = S2 + z * (S3 + z * (S4 + z * (S5 + z * (S6 + z * (S7 + z * S8))))); in __kernel_sincosl() 65 *sn = x + v * (S1 + z * r); in __kernel_sincosl() 67 *sn = x - ((z * (y / 2 - v * r) - y) - v * S1); in __kernel_sincosl() 71 r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * (C6 + in __kernel_sincosl() 73 *cs = w + (((1 - w) - hz) + (z * r - x * y)); in __kernel_sincosl() 109 long double hz, r, v, w, z; in __kernel_sincosl() local 117 r = S2 + z * (S3 + z * (S4 + z * (S5 + z * (S6 + z * (S7 + z * (S8 + in __kernel_sincosl() 121 *sn = x + v * (S1 + z * r); in __kernel_sincosl() 123 *cs = x - ((z * (y / 2 - v * r) - y) - v * S1); in __kernel_sincosl() [all …]
|
D | s_erff.c | 84 float R,S,P,Q,s,y,z,r; in erff() local 99 r = pp0+z*(pp1+z*pp2); in erff() 101 y = r/s; in erff() 123 r = expf(-z*z-0.5625F)*expf((z-x)*(z+x)+R/S); in erff() 124 if(hx>=0) return one-r/x; else return r/x-one; in erff() 131 float R,S,P,Q,s,y,z,r; in erfcf() local 143 r = pp0+z*(pp1+z*pp2); in erfcf() 145 y = r/s; in erfcf() 149 r = x*y; in erfcf() 150 r += (x-half); in erfcf() [all …]
|
D | e_lgammaf_r.c | 125 float nadj,p,p1,p2,q,r,t,w,y,z; in __ieee754_lgammaf_r() local 157 if (ix==0x3f800000||ix==0x40000000) r = 0; in __ieee754_lgammaf_r() 161 r = -__ieee754_logf(x); in __ieee754_lgammaf_r() 166 r = zero; in __ieee754_lgammaf_r() 177 r += p-y/2; break; in __ieee754_lgammaf_r() 180 r += tf + p; break; in __ieee754_lgammaf_r() 184 r += p1/p2-y/2; in __ieee754_lgammaf_r() 193 r = y/2+p/q; in __ieee754_lgammaf_r() 201 r += __ieee754_logf(z); break; in __ieee754_lgammaf_r() 209 r = (x-half)*(t-one)+w; in __ieee754_lgammaf_r() [all …]
|
D | e_rem_pio2.c | 57 double z,w,t,r,fn; in __ieee754_rem_pio2() local 132 r = x-fn*pio2_1; in __ieee754_rem_pio2() 137 y[0] = r-w; in __ieee754_rem_pio2() 141 t = r; in __ieee754_rem_pio2() 143 r = t-w; in __ieee754_rem_pio2() 144 w = fn*pio2_2t-((t-r)-w); in __ieee754_rem_pio2() 145 y[0] = r-w; in __ieee754_rem_pio2() 149 t = r; /* will cover all possible cases */ in __ieee754_rem_pio2() 151 r = t-w; in __ieee754_rem_pio2() 152 w = fn*pio2_3t-((t-r)-w); in __ieee754_rem_pio2() [all …]
|
D | k_tan.c | 80 double z, r, v, w, s; in __kernel_tan() local 102 r = T[1] + w * (T[3] + w * (T[5] + w * (T[7] + w * (T[9] + in __kernel_tan() 107 r = y + z * (s * (r + v) + y); in __kernel_tan() 108 r += T[0] * s; in __kernel_tan() 109 w = x + r; in __kernel_tan() 113 (v - 2.0 * (x - (w * w / (w + v) - r))); in __kernel_tan() 126 v = r - (z - x); /* z+v = r+x */ in __kernel_tan()
|
D | e_sqrtf.c | 31 u_int32_t r; in __ieee754_sqrtf() local 61 r = 0x01000000; /* r = moving bit from right to left */ in __ieee754_sqrtf() 63 while(r!=0) { in __ieee754_sqrtf() 64 t = s+r; in __ieee754_sqrtf() 66 s = t+r; in __ieee754_sqrtf() 68 q += r; in __ieee754_sqrtf() 71 r>>=1; in __ieee754_sqrtf()
|
D | k_tanf.c | 41 double z,r,w,s,t,u; in __kernel_tandf() local 58 r = T[4]+z*T[5]; in __kernel_tandf() 63 r = (x+s*u)+(s*w)*(t+w*r); in __kernel_tandf() 64 if(iy==1) return r; in __kernel_tandf() 65 else return -1.0/r; in __kernel_tandf()
|
D | e_lgamma_r.c | 204 double nadj,p,p1,p2,p3,q,r,t,w,y,z; in __ieee754_lgamma_r() local 236 if((((ix-0x3ff00000)|lx)==0)||(((ix-0x40000000)|lx)==0)) r = 0; in __ieee754_lgamma_r() 240 r = -__ieee754_log(x); in __ieee754_lgamma_r() 245 r = zero; in __ieee754_lgamma_r() 256 r += p-y/2; break; in __ieee754_lgamma_r() 264 r += tf + p; break; in __ieee754_lgamma_r() 268 r += p1/p2-y/2; in __ieee754_lgamma_r() 277 r = y/2+p/q; in __ieee754_lgamma_r() 285 r += __ieee754_log(z); break; in __ieee754_lgamma_r() 293 r = (x-half)*(t-one)+w; in __ieee754_lgamma_r() [all …]
|
D | s_erf.c | 200 double R,S,P,Q,s,y,z,r; in erf() local 215 r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4))); in erf() 217 y = r/s; in erf() 241 r = __ieee754_exp(-z*z-0.5625)*__ieee754_exp((z-x)*(z+x)+R/S); in erf() 242 if(hx>=0) return one-r/x; else return r/x-one; in erf() 253 double R,S,P,Q,s,y,z,r; in erfc() local 265 r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4))); in erfc() 267 y = r/s; in erfc() 271 r = x*y; in erfc() 272 r += (x-half); in erfc() [all …]
|
/bionic/libm/upstream-freebsd/lib/msun/ld128/ |
D | e_rem_pio2l.h | 65 long double z,w,t,r,fn; in __ieee754_rem_pio2l() local 80 r = x-fn*pio2_1; in __ieee754_rem_pio2l() 86 y[0] = r-w; in __ieee754_rem_pio2l() 91 t = r; in __ieee754_rem_pio2l() 93 r = t-w; in __ieee754_rem_pio2l() 94 w = fn*pio2_2t-((t-r)-w); in __ieee754_rem_pio2l() 95 y[0] = r-w; in __ieee754_rem_pio2l() 100 t = r; /* will cover all possible cases */ in __ieee754_rem_pio2l() 102 r = t-w; in __ieee754_rem_pio2l() 103 w = fn*pio2_3t-((t-r)-w); in __ieee754_rem_pio2l() [all …]
|
D | s_logl.c | 679 struct ld r; in logl() local 683 k_logl(x, &r); in logl() 684 RETURNSPI(&r); in logl() 704 struct ld r; in log10l() local 710 k_logl(x, &r); in log10l() 711 if (!r.lo_set) in log10l() 712 RETURNPI(r.hi); in log10l() 713 _2sumF(r.hi, r.lo); in log10l() 714 hi = r.hi; in log10l() 715 lo = r.lo + (r.hi - hi); in log10l() [all …]
|
D | k_expl.h | 242 long double q, r, r1, t; in __k_expl() local 254 r = r1 + r2; in __k_expl() 257 dr = r; in __k_expl() 258 q = r2 + r * r * (A2 + r * (A3 + r * (A4 + r * (A5 + r * (A6 + in __k_expl()
|
/bionic/libc/upstream-openbsd/lib/libc/stdlib/ |
D | tsearch.c | 34 int r; in tsearch() local 36 if ((r = (*compar)(key, (*rootp)->key)) == 0) /* T2: */ in tsearch() 38 rootp = (r < 0) ? in tsearch() 60 node *r; in tdelete() local 73 r = (*rootp)->right; /* D1: */ in tdelete() 75 q = r; in tdelete() 76 else if (r != (struct node_t *)0) { /* Right link is null? */ in tdelete() 77 if (r->left == (struct node_t *)0) { /* D2: Find successor */ in tdelete() 78 r->left = q; in tdelete() 79 q = r; in tdelete() [all …]
|
D | ldiv.c | 39 ldiv_t r; in ldiv() local 43 r.quot = num / denom; in ldiv() 44 r.rem = num % denom; in ldiv() 45 if (num >= 0 && r.rem < 0) { in ldiv() 46 r.quot++; in ldiv() 47 r.rem -= denom; in ldiv() 49 return (r); in ldiv()
|
D | imaxdiv.c | 39 imaxdiv_t r; in imaxdiv() local 43 r.quot = num / denom; in imaxdiv() 44 r.rem = num % denom; in imaxdiv() 45 if (num >= 0 && r.rem < 0) { in imaxdiv() 46 r.quot++; in imaxdiv() 47 r.rem -= denom; in imaxdiv() 49 return (r); in imaxdiv()
|
D | div.c | 39 div_t r; in div() local 41 r.quot = num / denom; in div() 42 r.rem = num % denom; in div() 66 if (num >= 0 && r.rem < 0) { in div() 67 r.quot++; in div() 68 r.rem -= denom; in div() 70 return (r); in div()
|
D | lldiv.c | 39 lldiv_t r; in lldiv() local 43 r.quot = num / denom; in lldiv() 44 r.rem = num % denom; in lldiv() 45 if (num >= 0 && r.rem < 0) { in lldiv() 46 r.quot++; in lldiv() 47 r.rem -= denom; in lldiv() 49 return (r); in lldiv()
|