/bionic/tests/ |
D | inttypes_test.cpp | 193 div_t r; in TEST() local 195 r = div(5, 3); in TEST() 196 EXPECT_EQ(1, r.quot); in TEST() 197 EXPECT_EQ(2, r.rem); in TEST() 199 r = div(5, -3); in TEST() 200 EXPECT_EQ(-1, r.quot); in TEST() 201 EXPECT_EQ(2, r.rem); in TEST() 203 r = div(-5, 3); in TEST() 204 EXPECT_EQ(-1, r.quot); in TEST() 205 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 == BIONIC_MULTIBYTE_RESULT_ILLEGAL_SEQUENCE) { in mbsnrtowcs() 94 if (r == BIONIC_MULTIBYTE_RESULT_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/libc/upstream-netbsd/lib/libc/regex/ |
D | regerror.c | 135 const struct rerr *r; in regerror() local 147 for (r = rerrs; r->code != 0; r++) in regerror() 148 if (r->code == target) in regerror() 152 if (r->code != 0) in regerror() 153 (void) strlcpy(convbuf, r->name, sizeof(convbuf)); in regerror() 158 s = r->explain; in regerror() 175 const struct rerr *r; in regatoi() local 177 for (r = rerrs; r->code != 0; r++) in regatoi() 178 if (strcmp(r->name, preg->re_endp) == 0) in regatoi() 180 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) * ulp */ in cbrt()
|
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() 112 long double hz, r, v, w, z; in __kernel_sincosl() local 120 r = S2 + z * (S3 + z * (S4 + z * (S5 + z * (S6 + z * (S7 + z * (S8 + in __kernel_sincosl() 124 *sn = x + v * (S1 + z * r); in __kernel_sincosl() 126 *sn = 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 lgammaf_r() local 157 if (ix==0x3f800000||ix==0x40000000) r = 0; in lgammaf_r() 161 r = -logf(x); in lgammaf_r() 166 r = zero; in lgammaf_r() 177 r += p-y/2; break; in lgammaf_r() 180 r += tf + p; break; in lgammaf_r() 184 r += p1/p2-y/2; in lgammaf_r() 193 r = y/2+p/q; in lgammaf_r() 201 r += logf(z); break; in lgammaf_r() 209 r = (x-half)*(t-one)+w; in lgammaf_r() [all …]
|
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 | 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_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 | s_cpowl.c | 57 long double x, y, r, theta, absa, arga; in cpowl() local 66 r = powl(absa, x); in cpowl() 69 r = r * expl(-y * arga); in cpowl() 72 w = CMPLXL(r * cosl(theta), r * sinl(theta)); in cpowl()
|
D | s_cpowf.c | 57 float x, y, r, theta, absa, arga; in cpowf() local 66 r = powf (absa, x); in cpowf() 69 r = r * expf (-y * arga); in cpowf() 72 w = CMPLXF(r * cosf (theta), r * sinf (theta)); in cpowf()
|
D | s_cpow.c | 58 double x, y, r, theta, absa, arga; in cpow() local 67 r = pow (absa, x); in cpow() 70 r = r * exp (-y * arga); in cpow() 73 w = CMPLX(r * cos (theta), r * sin (theta)); in cpow()
|
D | e_lgamma_r.c | 204 double nadj,p,p1,p2,p3,q,r,t,w,y,z; in lgamma_r() local 236 if((((ix-0x3ff00000)|lx)==0)||(((ix-0x40000000)|lx)==0)) r = 0; in lgamma_r() 240 r = -log(x); in lgamma_r() 245 r = zero; in lgamma_r() 256 r += p-y/2; break; in lgamma_r() 264 r += tf + p; break; in lgamma_r() 268 r += p1/p2-y/2; in lgamma_r() 277 r = y/2+p/q; in lgamma_r() 285 r += log(z); break; in lgamma_r() 293 r = (x-half)*(t-one)+w; in lgamma_r() [all …]
|
/bionic/libm/upstream-freebsd/lib/msun/bsdsrc/ |
D | b_tgamma.c | 187 struct Double r; in ratfun_gam() local 206 r.a = (float)p; in ratfun_gam() 207 r.b = p - r.a; in ratfun_gam() 209 tlo = tlo * p + thi * r.b + a0_lo; in ratfun_gam() 210 thi *= r.a; /* t = (z+c)^2*(P/Q) */ in ratfun_gam() 211 r.a = (float)(thi + a0_hi); in ratfun_gam() 212 r.b = ((a0_hi - r.a) + thi) + tlo; in ratfun_gam() 213 return (r); /* r = a0 + t */ in ratfun_gam() 233 struct Double yy, r; in small_gam() local 241 r.a = (float)y; in small_gam() [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 682 k_logl(x, &r); in logl() 683 RETURNSPI(&r); in logl() 705 struct ld r; in log10l() local 709 k_logl(x, &r); in log10l() 710 if (!r.lo_set) in log10l() 711 RETURNI(r.hi); in log10l() 712 _2sumF(r.hi, r.lo); in log10l() 713 hi = (float)r.hi; in log10l() 714 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 | 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 | 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 | 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()
|