/picolibc-latest/newlib/libm/ld/ld80/ |
D | s_erfl.c | 249 long double R, S, P, Q, s, y, z, r; in erfl() local 274 s = qq[0] + z * (qq[1] in erfl() 276 y = r / s; in erfl() 281 s = fabsl (x) - one; in erfl() 282 P = pa[0] + s * (pa[1] + s * (pa[2] in erfl() 283 + s * (pa[3] + s * (pa[4] + s * (pa[5] + s * (pa[6] + s * pa[7])))))); in erfl() 284 Q = qa[0] + s * (qa[1] + s * (qa[2] in erfl() 285 + s * (qa[3] + s * (qa[4] + s * (qa[5] + s * (qa[6] + s)))))); in erfl() 299 s = one / (x * x); in erfl() 302 R = ra[0] + s * (ra[1] + s * (ra[2] + s * (ra[3] + s * (ra[4] + in erfl() [all …]
|
/picolibc-latest/newlib/libm/math/ |
D | sf_erf.c | 100 float R, S, P, Q, s, y, z, r; in erff() local 117 s = one + z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5)))); in erff() 118 y = r / s; in erff() 122 s = fabsf(x) - one; in erff() 124 s * (pa1 + s * (pa2 + s * (pa3 + s * (pa4 + s * (pa5 + s * pa6))))); in erff() 126 s * (qa1 + s * (qa2 + s * (qa3 + s * (qa4 + s * (qa5 + s * qa6))))); in erff() 139 s = one / (x * x); in erff() 142 s * (ra1 + in erff() 143 s * (ra2 + in erff() 144 s * (ra3 + s * (ra4 + s * (ra5 + s * (ra6 + s * ra7)))))); in erff() [all …]
|
D | s_erf.c | 236 __float64 R, S, P, Q, s, y, z, r; in erf64() local 252 s = one + z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5)))); in erf64() 253 y = r / s; in erf64() 257 s = fabs64(x) - one; in erf64() 259 s * (pa1 + s * (pa2 + s * (pa3 + s * (pa4 + s * (pa5 + s * pa6))))); in erf64() 261 s * (qa1 + s * (qa2 + s * (qa3 + s * (qa4 + s * (qa5 + s * qa6))))); in erf64() 274 s = one / (x * x); in erf64() 277 s * (ra1 + in erf64() 278 s * (ra2 + in erf64() 279 s * (ra3 + s * (ra4 + s * (ra5 + s * (ra6 + s * ra7)))))); in erf64() [all …]
|
/picolibc-latest/newlib/libc/stdlib/ |
D | wctomb_r.c | 16 char *s, in __ascii_wctomb() argument 26 if (s == NULL) in __ascii_wctomb() 35 *s = (char) wchar; in __ascii_wctomb() 45 char *s, in __utf8_wctomb() argument 52 if (s == NULL) in __utf8_wctomb() 64 *s++ = 0xe0 | ((tmp & 0xf000) >> 12); in __utf8_wctomb() 65 *s++ = 0x80 | ((tmp & 0xfc0) >> 6); in __utf8_wctomb() 66 *s++ = 0x80 | (tmp & 0x3f); in __utf8_wctomb() 72 *s = wchar; in __utf8_wctomb() 77 *s++ = 0xc0 | ((wchar & 0x7c0) >> 6); in __utf8_wctomb() [all …]
|
D | strtol.c | 125 register const unsigned char *s = (const unsigned char *)nptr; in _strtol_l() local 144 c = *s++; in _strtol_l() 148 c = *s++; in _strtol_l() 150 c = *s++; in _strtol_l() 152 c == '0' && (*s == 'x' || *s == 'X') && (('0' <= s[1] && s[1] <= '9') || in _strtol_l() 153 ('a' <= s[1] && s[1] <= 'f') || in _strtol_l() 154 ('A' <= s[1] && s[1] <= 'F'))) { in _strtol_l() 155 c = s[1]; in _strtol_l() 156 s += 2; in _strtol_l() 182 for (acc = 0, any = 0;; c = *s++) { in _strtol_l() [all …]
|
D | rand_r.c | 33 long s = (long)(*seed); in rand_r() local 34 if (s == 0) in rand_r() 35 s = 0x12345987; in rand_r() 36 k = s / 127773; in rand_r() 37 s = 16807 * (s - k * 127773) - 2836 * k; in rand_r() 38 if (s < 0) in rand_r() 39 s += 2147483647; in rand_r() 40 (*seed) = (unsigned int)s; in rand_r() 41 return (int)(s & RAND_MAX); in rand_r()
|
D | mbtowc_r.c | 17 const char *s, in __ascii_mbtowc() argument 22 unsigned char *t = (unsigned char *)s; in __ascii_mbtowc() 28 if (s == NULL) in __ascii_mbtowc() 83 ___iso_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, in ___iso_mbtowc() argument 87 unsigned char *t = (unsigned char *)s; in ___iso_mbtowc() 92 if (s == NULL) in ___iso_mbtowc() 121 __iso_8859_1_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, in __iso_8859_1_mbtowc() argument 124 return ___iso_mbtowc (r, pwc, s, n, -1, state); in __iso_8859_1_mbtowc() 128 __iso_8859_2_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, in __iso_8859_2_mbtowc() argument 131 return ___iso_mbtowc (r, pwc, s, n, 0, state); in __iso_8859_2_mbtowc() [all …]
|
D | strtoull.c | 129 register const unsigned char *s = (const unsigned char *)nptr; in _strtoull_l() local 139 c = *s++; in _strtoull_l() 143 c = *s++; in _strtoull_l() 145 c = *s++; in _strtoull_l() 147 c == '0' && (*s == 'x' || *s == 'X')) { in _strtoull_l() 148 c = s[1]; in _strtoull_l() 149 s += 2; in _strtoull_l() 156 for (acc = 0, any = 0;; c = *s++) { in _strtoull_l() 181 *endptr = (char *) (any ? (char *)s - 1 : nptr); in _strtoull_l() 188 strtoull_l (const char *__restrict s, char **__restrict ptr, int base, in strtoull_l() argument [all …]
|
D | strtoll.c | 133 register const unsigned char *s = (const unsigned char *)nptr; in _strtoll_l() local 145 c = *s++; in _strtoll_l() 149 c = *s++; in _strtoll_l() 151 c = *s++; in _strtoll_l() 153 c == '0' && (*s == 'x' || *s == 'X')) { in _strtoll_l() 154 c = s[1]; in _strtoll_l() 155 s += 2; in _strtoll_l() 181 for (acc = 0, any = 0;; c = *s++) { in _strtoll_l() 206 *endptr = (char *) (any ? (char *)s - 1 : nptr); in _strtoll_l() 213 strtoll_l (const char *__restrict s, char **__restrict ptr, int base, in strtoll_l() argument [all …]
|
D | strtoul.c | 133 register const unsigned char *s = (const unsigned char *)nptr; in strtoul_l() local 143 c = *s++; in strtoul_l() 147 c = *s++; in strtoul_l() 149 c = *s++; in strtoul_l() 151 c == '0' && (*s == 'x' || *s == 'X')) { in strtoul_l() 152 c = s[1]; in strtoul_l() 153 s += 2; in strtoul_l() 160 for (acc = 0, any = 0;; c = *s++) { in strtoul_l() 185 *endptr = (char *) (any ? (char *)s - 1 : nptr); in strtoul_l() 190 strtoul (const char *__restrict s, in strtoul() argument [all …]
|
D | system.c | 59 static int do_system (const char *s); 65 system (const char *s) in system() argument 68 return _system (s); in system() 70 if (s == NULL) in system() 82 if (s == NULL) in system() 84 return do_system (s); in system() 86 if (s == NULL) in system() 106 do_system (const char *s) in do_system() argument 113 argv[2] = (char *) s; in do_system()
|
D | wcstol.c | 133 register const wchar_t *s = nptr; in wcstol_l() local 145 c = *s++; in wcstol_l() 149 c = *s++; in wcstol_l() 151 c = *s++; in wcstol_l() 153 c == L'0' && (*s == L'x' || *s == L'X')) { in wcstol_l() 154 c = s[1]; in wcstol_l() 155 s += 2; in wcstol_l() 181 for (acc = 0, any = 0;; c = *s++) { in wcstol_l() 206 *endptr = (wchar_t *) (any ? s - 1 : nptr); in wcstol_l() 212 wcstol (const wchar_t *__restrict s, in wcstol() argument [all …]
|
D | wcstoll.c | 134 register const wchar_t *s = nptr; in wcstoll_l() local 146 c = *s++; in wcstoll_l() 150 c = *s++; in wcstoll_l() 152 c = *s++; in wcstoll_l() 154 c == L'0' && (*s == L'x' || *s == L'X')) { in wcstoll_l() 155 c = s[1]; in wcstoll_l() 156 s += 2; in wcstoll_l() 182 for (acc = 0, any = 0;; c = *s++) { in wcstoll_l() 207 *endptr = (wchar_t *) (any ? s - 1 : nptr); in wcstoll_l() 212 wcstoll (const wchar_t *__restrict s, in wcstoll() argument [all …]
|
D | wcstoul.c | 134 register const wchar_t *s = nptr; in wcstoul_l() local 144 c = *s++; in wcstoul_l() 148 c = *s++; in wcstoul_l() 150 c = *s++; in wcstoul_l() 152 c == L'0' && (*s == L'x' || *s == L'X')) { in wcstoul_l() 153 c = s[1]; in wcstoul_l() 154 s += 2; in wcstoul_l() 161 for (acc = 0, any = 0;; c = *s++) { in wcstoul_l() 186 *endptr = (wchar_t *) (any ? s - 1 : nptr); in wcstoul_l() 191 wcstoul (const wchar_t *__restrict s, in wcstoul() argument [all …]
|
D | wcstoull.c | 146 register const wchar_t *s = nptr; in wcstoull_l() local 160 c = *s++; in wcstoull_l() 164 c = *s++; in wcstoull_l() 166 c = *s++; in wcstoull_l() 168 c == L'0' && (*s == L'x' || *s == L'X')) { in wcstoull_l() 169 c = s[1]; in wcstoull_l() 170 s += 2; in wcstoull_l() 177 for (acc = 0, any = 0;; c = *s++) { in wcstoull_l() 202 *endptr = (wchar_t *) (any ? s - 1 : nptr); in wcstoull_l() 207 wcstoull (const wchar_t *__restrict s, in wcstoull() argument [all …]
|
/picolibc-latest/newlib/libc/string/ |
D | strchr.c | 75 const unsigned char *s = (const unsigned char *)s1; in strchr() local 86 while (UNALIGNED (s)) in strchr() 88 if (!*s) in strchr() 89 return (char *) s; in strchr() 90 s++; in strchr() 93 aligned_addr = (unsigned long *) s; in strchr() 97 s = (const unsigned char *) aligned_addr; in strchr() 98 while (*s) in strchr() 99 s++; in strchr() 100 return (char *) s; in strchr() [all …]
|
D | strtok_r.c | 35 __strtok_r (register char *s, in __strtok_r() argument 45 if (s == NULL && (s = *lasts) == NULL) in __strtok_r() 52 c = *s++; in __strtok_r() 59 *lasts = s; in __strtok_r() 60 s[-1] = 0; in __strtok_r() 61 return (s - 1); in __strtok_r() 70 tok = s - 1; in __strtok_r() 77 c = *s++; in __strtok_r() 82 s = NULL; in __strtok_r() 84 s[-1] = 0; in __strtok_r() [all …]
|
/picolibc-latest/newlib/libc/time/ |
D | strptime.c | 165 char *s; in strptime_l() local 206 ret = strtol_l (buf, &s, 10, locale); in strptime_l() 207 if (s == buf) in strptime_l() 210 buf = s; in strptime_l() 214 s = strptime_l (buf, _ctloc (c_fmt), timeptr, locale); in strptime_l() 215 if (s == NULL) in strptime_l() 217 buf = s; in strptime_l() 221 s = strptime_l (buf, "%m/%d/%y", timeptr, locale); in strptime_l() 222 if (s == NULL) in strptime_l() 224 buf = s; in strptime_l() [all …]
|
/picolibc-latest/newlib/libc/iconv/lib/ |
D | endian.h | 32 # define ICONV_BETOHS(s) \ argument 33 ((((s) << 8) & 0xFF00) | (((s) >> 8) & 0x00FF)) 41 # define ICONV_LETOHS(s) (s) argument 44 # define ICONV_HTOLES(s) ICONV_LETOHS (s) argument 46 # define ICONV_HTOBES(s) ICONV_BETOHS (s) argument 51 # define ICONV_BETOHS(s) (s) argument 54 # define ICONV_LETOHS(s) \ argument 55 ((((s) << 8) & 0xFF00) | (((s) >> 8) & 0x00FF)) 63 # define ICONV_HTOBES(s) ICONV_BETOHS (s) argument 65 # define ICONV_HTOLES(s) ICONV_LETOHS (s) argument
|
/picolibc-latest/test/libc-testsuite/ |
D | strtol.c | 56 char *s, *c; in test_strtol() local 67 TEST(l, strtol(s="2147483648", &c, 0), 2147483647L, "uncaught overflow %ld != %ld"); in test_strtol() 68 TEST2(i, c-s, 10, "wrong final position %d != %d"); in test_strtol() 71 TEST(l, strtol(s="-2147483649", &c, 0), -2147483647L-1, "uncaught overflow %ld != %ld"); in test_strtol() 72 TEST2(i, c-s, 11, "wrong final position %d != %d"); in test_strtol() 75 TEST(ul, strtoul(s="4294967296", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu"); in test_strtol() 76 TEST2(i, c-s, 10, "wrong final position %d != %d"); in test_strtol() 79 TEST(ul, strtoul(s="-1", &c, 0), -1UL, "rejected negative %lu != %lu"); in test_strtol() 80 TEST2(i, c-s, 2, "wrong final position %d != %d"); in test_strtol() 83 TEST(ul, strtoul(s="-2", &c, 0), -2UL, "rejected negative %lu != %lu"); in test_strtol() [all …]
|
D | string.c | 47 #define TEST_S(s, x, m) do { \ argument 48 if (s == NULL || strcmp((s),(x)) != 0) { \ 49 printf(__FILE__ ":%d: [%s] != [%s] (%s)\n", __LINE__, s, x, m); \ 59 char *s = NULL; in test_string() local 64 TEST(s, strcpy(b, c), b, "wrong return %p != %p"); in test_string() 65 TEST_S(s, "abc", "strcpy gave incorrect string"); in test_string() 66 TEST(s, strcpy(b+1, c), b+1, "wrong return %p != %p"); in test_string() 67 TEST_S(s, "abc", "strcpy gave incorrect string"); in test_string() 68 TEST(s, strcpy(b+2, c), b+2, "wrong return %p != %p"); in test_string() 69 TEST_S(s, "abc", "strcpy gave incorrect string"); in test_string() [all …]
|
/picolibc-latest/newlib/libc/machine/h8500/ |
D | mulsi3.c | 24 } s; member 30 int s; in __mulsi3() local 35 if (a.s.msw == 0 && in __mulsi3() 36 b.s.msw == 0) in __mulsi3() 38 return (long)a.s.lsw * b.s.lsw; in __mulsi3() 41 s = 0; in __mulsi3() 44 s = 1; in __mulsi3() 49 s = 1-s; in __mulsi3() 53 pp1 = (long)a.s.lsw * b.s.lsw ; in __mulsi3() 54 pp2 = (long)a.s.lsw * b.s.msw + (long)a.s.msw * b.s.lsw; in __mulsi3() [all …]
|
/picolibc-latest/newlib/libc/machine/spu/ |
D | stdio.c | 57 __cleanup (struct _reent *s) in __cleanup() argument 68 __sinit (struct _reent *s) in __sinit() argument 70 _REENT_CLEANUP(s) = __cleanup; in __sinit() 72 _REENT_STDIN(s) = &s->__sf[0]; in __sinit() 73 _REENT_STDIN(s)->_fp = SPE_STDIN; in __sinit() 75 _REENT_STDOUT(s) = &s->__sf[1]; in __sinit() 76 _REENT_STDOUT(s)->_fp = SPE_STDOUT; in __sinit() 78 _REENT_STDERR(s) = &s->__sf[2]; in __sinit() 79 _REENT_STDERR(s)->_fp = SPE_STDERR; in __sinit()
|
/picolibc-latest/newlib/libc/tinystdio/ |
D | ldtox_engine.c | 95 _u128 fi, s; in __ldtox_engine() local 104 s = fi = _u128_lshift(_u128_and(fi, LSIG_MASK), LSIG_SHIFT); in __ldtox_engine() 105 if (!_u128_is_zero(s) || exp != 0) { in __ldtox_engine() 111 s = _u128_or(s, LSIG_MSB); in __ldtox_engine() 127 …if (_u128_gt(_u128_and(s, _u128_not(mask)), half) || _u128_and_64(_u128_rshift(s, bits), 1) != 0) { in __ldtox_engine() 128 s = _u128_plus(s, half); in __ldtox_engine() 139 if (_u128_ge(s, _u128_lshift(to_u128(1), __LDBL_MANT_DIG__))) { in __ldtox_engine() 140 s = _u128_rshift(s, 4); in __ldtox_engine() 146 s = _u128_and(s, mask); in __ldtox_engine() 161 int dig = _u128_and_64(s, 0xf); in __ldtox_engine() [all …]
|
/picolibc-latest/test/ |
D | test-put.c | 66 size_t s; in main() local 84 s = fwrite("fwrite 1\n", 1, 9, stdout); in main() 85 ret += check_s ("fwrite 1", s == 9, 9, s); in main() 87 s = fwrite("fwrite 2\n", 0, 9, stdout); in main() 88 ret += check_s ("fwrite 2", s == 0, 0, s); in main() 90 s = fwrite("fwrite 3\n", 0, 0, stdout); in main() 91 ret += check_s ("fwrite 3", s == 0, 0, s); in main()
|