Home
last modified time | relevance | path

Searched +full:- +full:i (Results 1 – 25 of 493) sorted by relevance

12345678910>>...20

/picolibc-latest/newlib/libm/test/
Dsprint_ivec.c20 #pragma GCC diagnostic ignored "-Woverflow"
22 #pragma GCC diagnostic ignored "-Wliteral-range"
24 #define I(a,b) (b) macro
26 #define I(a,b) (a) macro
31 #if TEST_PART == 1 || TEST_PART == -1
32 {__LINE__, 0x000838d2l, I("838d2", "38d2"), "%.4x", },
33 {__LINE__, 0x0063be46l, I("63BE46", "BE46 "), "%-6X", },
34 {__LINE__, -0x1b236c0l, I("-28456640", "-14016"), "%#0.d", },
35 {__LINE__, -0x0000003l, "-3", "% 0d", },
37 {__LINE__, -0x00001f2l, "-498", "%1ld", },
[all …]
/picolibc-latest/newlib/libm/math/
Dkf_rem_pio2.c1 /* kf_rem_pio2.c -- float version of k_rem_pio2.c
25 4.5776367188e-04, /* 0x39f00000 */
26 2.5987625122e-05, /* 0x37da0000 */
27 7.5437128544e-08, /* 0x33a20000 */
28 6.0026650317e-11, /* 0x2e840000 */
29 7.3896444519e-13, /* 0x2b500000 */
30 5.3845816694e-15, /* 0x27c20000 */
31 5.6378512969e-18, /* 0x22d00000 */
32 8.3009228831e-20, /* 0x1fc40000 */
33 3.2756352257e-22, /* 0x1bc60000 */
[all …]
Dk_rem_pio2.c19 * y = x - N*pi/2
28 * (2/pi) is represented by an array of 24-bit integers in ipio2[].
32 * pieces of 24-bit integers in double precision format.
33 * x[i] will be the i-th 24 bit of x. The scaled exponent
34 * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
38 * e0 = ilogb(z)-23
39 * z = scalbn(z,-e0)
40 * for i = 0,1,2
41 * x[i] = floor(z)
42 * z = (z-x[i])*2**24
[all …]
Dsf_jn.c1 /* ef_jn.c -- float version of e_jn.c.
26 __int32_t i, hx, ix, sgn; in jnf() local
30 /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x) in jnf()
31 * Thus, J(-n,x) = J(n,-x) in jnf()
39 n = -n; in jnf()
40 x = -x; in jnf()
47 sgn = (n & 1) & (hx >> 31); /* even n -- 0, odd n -- sign(x) */ in jnf()
52 /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ in jnf()
55 for (i = 1; i < n; i++) { in jnf()
57 b = b * ((float)(i + i) / x) - a; /* avoid underflow */ in jnf()
[all …]
/picolibc-latest/newlib/testsuite/newlib.locale/
DUTF-8.c7 * Tests gleaned from Markus Kuhn's UTF-8 and Unicode FAQ,
8 * and specifically, his UTF-8-test.txt decoder stress test file.
20 {0x0}, /* U-00000000 */
21 {0xc2, 0x80}, /* U-00000080 */
22 {0xe0, 0xa0, 0x80}, /* U-00000800 */
23 {0xf0, 0x90, 0x80, 0x80}, /* U-00010000 */
24 {0xf8, 0x88, 0x80, 0x80, 0x80}, /* U-00200000 */
25 {0xfc, 0x84, 0x80, 0x80, 0x80, 0x80} /* U-04000000 */
29 {0x7f}, /* U-0000007F */
30 {0xdf, 0xbf}, /* U-000007FF */
[all …]
/picolibc-latest/test/
Dmalloc_stress.c2 * SPDX-License-Identifier: BSD-3-Clause
62 int i; in shuffle_order() local
63 for (i = 0; i < NUM_MALLOC; i++) in shuffle_order()
64 order[i] = i; in shuffle_order()
65 for (i = 0; i < NUM_MALLOC - 1; i++) { in shuffle_order()
66 int j = randint(NUM_MALLOC - 1 - i) + i + 1; in shuffle_order()
68 int t = order[i]; in shuffle_order()
69 order[i] = order[j]; in shuffle_order()
75 fill_block(int i) in fill_block() argument
77 block_data[i] = randint(256); in fill_block()
[all …]
Dtimegm.c2 * SPDX-License-Identifier: BSD-3-Clause
54 unsigned i; in main() local
58 for (i = 0; i < NUM_TEST; i++) { in main()
59 tests[i].time = random(); in main()
60 gmtime_r(&tests[i].time, &tests[i].tm); in main()
62 printf (" .time = %ld,\n", tests[i].time); in main()
64 printf (" .tm_sec = %d,\n", tests[i].tm.tm_sec); /* Seconds (0-60) */ in main()
65 printf (" .tm_min = %d,\n", tests[i].tm.tm_min); /* Minutes (0-59) */ in main()
66 printf (" .tm_hour = %d,\n", tests[i].tm.tm_hour); /* Hours (0-23) */ in main()
67 … printf (" .tm_mday = %d,\n", tests[i].tm.tm_mday); /* Day of the month (1-31) */ in main()
[all …]
Dlong_double_gen.5c61 for (int i = 0; i < dim(limited_funcs); i++)
62 if (limited_funcs[i] == name)
77 for (int i = 0; i < String::length(s); i++) {
78 int c = s[i];
80 c = c - 'a' + 'A';
106 for (x = -10; x <= 10; x += .1) {
112 sy = sprintf("%.-eL", y);
121 sy = "-" + sy;
125 printf(" { .line = __LINE__, .x = %.-eL, .y = %s },\n", x, sy);
126 } catch invalid_argument(string s, int i, poly x) {
[all …]
Dtestcases.c2 * This file was generated from printf-tests.txt included
6 * https://github.com/BartMassey/printf-tests
8 * printf-tests.txt carries the following Copyright, which
82 #define I(a,b) (b) macro
84 #define I(a,b) (a) macro
88 /* XXX This code generated automatically by gen-testcases.hs
89 from ../../printf-tests.txt . You probably do not want to
100 result |= test(__LINE__, "-42", "% d", -42);
103 result |= test(__LINE__, " -42", "% 5d", -42);
105 result |= test(__LINE__, " -42", "% 15d", -42);
[all …]
/picolibc-latest/newlib/libc/iconv/ces/
Deuc.c2 * Copyright (c) 2003-2004, Artem B. Bityuckiy
102 int i; in euc_from_ucs_init() local
112 data->type = TYPE_EUC_JP; in euc_from_ucs_init()
113 data->mb_cur_max = 3; in euc_from_ucs_init()
114 data->desc = &euc_jp_cs_desc[0]; in euc_from_ucs_init()
122 data->type = TYPE_EUC_KR; in euc_from_ucs_init()
123 data->mb_cur_max = 2; in euc_from_ucs_init()
124 data->desc = &euc_kr_cs_desc[0]; in euc_from_ucs_init()
132 data->type = TYPE_EUC_TW; in euc_from_ucs_init()
133 data->mb_cur_max = 4; in euc_from_ucs_init()
[all …]
/picolibc-latest/test/libc-testsuite/
Dsscanf.c2 * Copyright © 2005-2020 Rich Felker
44 TEST(i, sscanf(# x, "%lf", &d), 1, "got %d fields, expected %d"), \
48 TEST(i, sscanf(v, "%lf", &d), 1, "got %d fields, expected %d"), \
51 #pragma GCC diagnostic ignored "-Wpragmas"
52 #pragma GCC diagnostic ignored "-Wunknown-warning-option"
53 #pragma GCC diagnostic ignored "-Wunused-value"
54 #pragma GCC diagnostic ignored "-Woverflow"
55 #pragma GCC diagnostic ignored "-Wliteral-range"
56 #pragma GCC diagnostic ignored "-Wformat-extra-args"
72 int i; in test_sscanf() local
[all …]
Dqsort.c2 * Copyright © 2005-2020 Rich Felker
36 long d = *(long*)a - *(long*)b; in icmp()
37 return (d > 0) ? 1 : (d < 0) ? -1 : 0; in icmp()
52 int i; in tcmp() local
54 for (i = 0; i < 3; i++) { in tcmp()
55 c = (int) a->b[i] - (int) b->b[i]; in tcmp()
67 /* 26 items -- even */
77 /* 23 items -- odd, prime */
92 int i; in test_qsort() local
96 for (i=0; i<(int) (sizeof(s)/sizeof(char *)-1); i++) { in test_qsort()
[all …]
Dstrtol.c2 * Copyright © 2005-2020 Rich Felker
34 #pragma GCC diagnostic ignored "-Wpragmas"
35 #pragma GCC diagnostic ignored "-Wunknown-warning-option"
36 #pragma GCC diagnostic ignored "-Wformat-extra-args"
37 #pragma GCC diagnostic ignored "-Wformat"
49 int i; in test_strtol() local
68 TEST2(i, c-s, 10, "wrong final position %d != %d"); in test_strtol()
69 TEST2(i, errno, ERANGE, "missing errno %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()
[all …]
/picolibc-latest/newlib/libc/string/
Dstr-two-way.h1 /* Byte-wise substring search, using the Two-Way algorithm.
14 lvalue. For NUL-terminated searches,
19 For case-insensitivity, you may optionally define:
35 /* We use the Two-Way string matching algorithm, which guarantees
38 Boyer-Moore algorithm to achieve improved (potentially sub-linear)
41 See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260
42 and http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm
45 /* Point at which computing a bad-byte shift table is likely to be
50 hand, on non-POSIX systems with CHAR_BIT larger than eight, the
78 non-empty NEEDLE have a local period of at least 1 and no greater
[all …]
Dtimingsafe_memcmp.c26 size_t i; in timingsafe_memcmp() local
29 for (i = 0; i < len; i++) { in timingsafe_memcmp()
30 /* lt is -1 if p1[i] < p2[i]; else 0. */ in timingsafe_memcmp()
31 int lt = (p1[i] - p2[i]) >> CHAR_BIT; in timingsafe_memcmp()
33 /* gt is -1 if p1[i] > p2[i]; else 0. */ in timingsafe_memcmp()
34 int gt = (p2[i] - p1[i]) >> CHAR_BIT; in timingsafe_memcmp()
36 /* cmp is 1 if p1[i] > p2[i]; -1 if p1[i] < p2[i]; else 0. */ in timingsafe_memcmp()
37 int cmp = lt - gt; in timingsafe_memcmp()
42 /* set done if p1[i] != p2[i]. */ in timingsafe_memcmp()
/picolibc-latest/newlib/testsuite/newlib.string/
Dmemmove1.c1 /* A minor test-program for memmove.
29 /* Test moves of 0..MAX bytes; overlapping-src-higher,
30 overlapping-src-lower and non-overlapping. The overlap varies with
34 making this 256 added 90s to the test-run (2GHz P4) while 64 (4s) was
51 /* A safe target-independent memmove. */
58 while (n-- > 0) in mymemmove()
64 while (n-- > 0) in mymemmove()
65 *--dest = *--src; in mymemmove()
70 pass -fno-builtin-memmove. */
96 size_t i; in fill() local
[all …]
Dtstring.c21 #pragma GCC diagnostic ignored "-Wmemset-transposed-args"
23 #pragma GCC diagnostic ignored "-Wstringop-truncation"
25 #pragma GCC diagnostic ignored "-Wunused-value"
41 int i; in mycopy() local
43 for (i = 0; i < size; ++i) in mycopy()
45 target[i] = source[i]; in mycopy()
51 int i; in myset() local
53 for (i = 0; i < size; ++i) in myset()
55 target[i] = ch; in myset()
78 unsigned i, j, k, x, z = 0, align_test_iterations; in main() local
[all …]
/picolibc-latest/newlib/libc/locale/
Dnewlocale.c2 Copyright (c) 1996 - 2002 FreeBSD Project
32 <<newlocale>>---create or modify a locale object
57 bitwise-inclusive OR of the symbolic constants LC_CTYPE_MASK,
59 LC_MESSAGES_MASK, or any of the other implementation-defined LC_*_MASK
72 "POSIX" Specifies the minimal environment for C-language translation
77 "" Specifies an implementation-defined native environment. This
102 <<newlocale>> is POSIX-1.2008.
135 int i; in newlocale() local
140 for (i = 1; i < _LC_LAST; ++i) in newlocale()
142 if (((1 << i) & category_mask) != 0) in newlocale()
[all …]
/picolibc-latest/newlib/libm/ld/common/
Dk_rem_pio2.c20 * y = x - N*pi/2
29 * (2/pi) is represented by an array of 24-bit integers in ipio2[].
33 * pieces of 24-bit integers in double precision format.
34 * x[i] will be the i-th 24 bit of x. The scaled exponent
35 * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
39 * e0 = ilogb(z)-23
40 * z = scalbn(z,-e0)
41 * for i = 0,1,2
42 * x[i] = floor(z)
43 * z = (z-x[i])*2**24
[all …]
/picolibc-latest/newlib/libc/sys/rtems/include/
DREADME29 git format-patch 3bf66365129a13933f77d1f4421d5136861cffb4 -- \
39 sed -i 's,include/arpa/inet.h,newlib/libc/sys/rtems/include/arpa/inet.h,g' *.patch
40 sed -i 's,include/netdb.h,newlib/libc/sys/rtems/include/netdb.h,g' *.patch
41 sed -i 's,include/termios.h,newlib/libc/sys/rtems/include/termios.h,g' *.patch
42 sed -i 's,sys/net/if.h,newlib/libc/sys/rtems/include/net/if.h,g' *.patch
43 sed -i 's,sys/netinet6/in6.h,newlib/libc/sys/rtems/include/netinet6/in6.h,g' *.patch
44 sed -i 's,sys/netinet/in.h,newlib/libc/sys/rtems/include/netinet/in.h,g' *.patch
45 sed -i 's,sys/netinet/tcp.h,newlib/libc/sys/rtems/include/netinet/tcp.h,g' *.patch
46 sed -i 's,sys/sys/filio.h,newlib/libc/sys/rtems/include/sys/filio.h,g' *.patch
47 sed -i 's,sys/sys/ioccom.h,newlib/libc/sys/rtems/include/sys/ioccom.h,g' *.patch
[all …]
/picolibc-latest/newlib/libm/complex/
Dcasinl.c3 /*-
54 w = M_PI_2L + 0.0L * (double complex) I; in __weak_alias()
59 w = asinl(x) + 0.0L * (double complex) I; in __weak_alias()
70 z2.r = (x - y) * (x + y); in __weak_alias()
71 z2.i = 2.0L * x * y; in __weak_alias()
76 ca.i = y; in __weak_alias()
78 sum.i = y; in __weak_alias()
81 ct.r = z2.r * ca.r - z2.i * ca.i; in __weak_alias()
82 ct.i = z2.r * ca.i + z2.i * ca.r; in __weak_alias()
84 ca.i = ct.i; in __weak_alias()
[all …]
Dcasinf.c3 /*-
55 w = M_PI_2 + 0.0f * I; in __weak_alias()
60 w = asinf(x) + 0.0f * I; in __weak_alias()
71 z2.r = (x - y) * (x + y); in __weak_alias()
72 z2.i = 2.0 * x * y; in __weak_alias()
77 ca.i = y; in __weak_alias()
79 sum.i = y; in __weak_alias()
82 ct.r = z2.r * ca.r - z2.i * ca.i; in __weak_alias()
83 ct.i = z2.r * ca.i + z2.i * ca.r; in __weak_alias()
85 ca.i = ct.i; in __weak_alias()
[all …]
Dcasin.c3 /*-
37 <<casin>>, <<casinf>>---complex arc sine
52 with branch cuts outside the interval [-1, +1] along the real axis.
61 and in the interval [-pi/2, +pi/2] along the real axis.
66 and in the interval [$-\pi/2$, $+\pi/2$] along the real axis.
98 w = M_PI_2 + 0.0 * (double complex) I; in __weak_alias()
103 w = asin(x) + 0.0 * (double complex) I; in __weak_alias()
114 z2.r = (x - y) * (x + y); in __weak_alias()
115 z2.i = 2.0 * x * y; in __weak_alias()
120 ca.i = y; in __weak_alias()
[all …]
/picolibc-latest/newlib/libc/stdlib/
Ddtoa.c22 AT&T Bell Laboratories, Room 2C-463
24 Murray Hill, NJ 07974-2070
49 n = S->_wds; in quorem()
51 /*debug*/ if (b->_wds > n) in quorem()
54 if (b->_wds < n) in quorem()
56 sx = S->_x; in quorem()
57 sxe = sx + --n; in quorem()
58 bx = b->_x; in quorem()
76 y = (*bx & 0xffff) - (ys & 0xffff) + borrow; in quorem()
79 z = (*bx >> 16) - (zs & 0xffff) + borrow; in quorem()
[all …]
Dldtoa.c1 /* Extended precision arithmetic functions for long double I/O.
6 #pragma GCC diagnostic ignored "-Wpragmas"
7 #pragma GCC diagnostic ignored "-Wunknown-warning-option"
8 #pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
9 #pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value"
10 #pragma GCC diagnostic ignored "-Wanalyzer-out-of-bounds"
11 #pragma GCC diagnostic ignored "-Warray-bounds"
12 #pragma GCC diagnostic ignored "-Wanalyzer-null-dereference"
42 #define NBITS ((NI-4)*16)
52 /* Maximum exponent digits - base 10 */
[all …]

12345678910>>...20