/picolibc-latest/newlib/libc/tinystdio/ |
D | stdio_private.h | 30 /* $Id: stdio_private.h 847 2005-09-06 18:49:15Z joerg_wunsch $ */ 49 #include <stdio-bufio.h> 96 * non-const as in the generic case, this buffer is obtained 138 #define _FDEV_BUFIO_FD(bf) ((int)((intptr_t) (bf)->ptr)) 156 if (!(bf->bflags & __BFPTR)) in bufio_read() 157 return (bf->read_int)(_FDEV_BUFIO_FD(bf), buf, count); in bufio_read() 159 return (bf->read_ptr)((void *) bf->ptr, buf, count); in bufio_read() 165 if (!(bf->bflags & __BFPTR)) in bufio_write() 166 return (bf->write_int)(_FDEV_BUFIO_FD(bf), buf, count); in bufio_write() 168 return (bf->write_ptr)((void *) bf->ptr, buf, count); in bufio_write() [all …]
|
D | dtoa_ryu.c | 6 // (See accompanying file LICENSE-Apache or copy at 7 // http://www.apache.org/licenses/LICENSE-2.0) 11 // (See accompanying file LICENSE-Boost or copy at 19 // -DRYU_DEBUG Generate verbose debugging output to stdout. 21 // -DRYU_ONLY_64_BIT_OPS Avoid using uint128_t or 64-bit intrinsics. Slower, 52 static int decimalLength17(const uint64_t v) { in decimalLength17() argument 55 while (c <= v) { in decimalLength17() 65 // Decimal exponent's range is -324 to 308 78 e2 = 1 - DOUBLE_BIAS - DOUBLE_MANTISSA_BITS - 2; in d2d() 81 e2 = (int32_t) ieeeExponent - DOUBLE_BIAS - DOUBLE_MANTISSA_BITS - 2; in d2d() [all …]
|
D | ftoa_ryu.c | 6 // (See accompanying file LICENSE-Apache or copy at 7 // http://www.apache.org/licenses/LICENSE-2.0) 11 // (See accompanying file LICENSE-Boost or copy at 19 // -DRYU_DEBUG Generate verbose debugging output to stdout. 34 // Returns the number of decimal digits in v, which must not contain more than 9 digits. 35 static int decimalLength9(const uint32_t v) { in decimalLength9() argument 38 while (c <= v) { in decimalLength9() 48 // Decimal exponent's range is -45 to 38 61 e2 = 1 - FLOAT_BIAS - FLOAT_MANTISSA_BITS - 2; in f2d() 64 e2 = (int32_t) ieeeExponent - FLOAT_BIAS - FLOAT_MANTISSA_BITS - 2; in f2d() [all …]
|
D | ultoa_invert.c | 35 * least 64-bits get the fancy code for 64-bit values and platforms 36 * where 'int' is not at least 32-bits also get the fancy code for 37 * 32-bit values 94 /* r = n - q * 10 */ in udivmod10() 95 r = (char) (n - (((q << 2) + q) << 1)); in udivmod10() 99 * be +0/-1 of the real result. Check and adjust in udivmod10() 103 r -= 10; in udivmod10() 134 char hex = ('a' - '0' - 10 + 16) - base; in __ultoa_invert() 139 char v; in __ultoa_invert() local 142 val = udivmod(val, base, &v); in __ultoa_invert() [all …]
|
/picolibc-latest/newlib/libm/machine/spu/headers/ |
D | erf_utils.h | 1 /* -------------------------------------------------------------- */ 10 /* - Redistributions of source code must retain the above copyright*/ 13 /* - Redistributions in binary form must reproduce the above */ 18 /* - Neither the name of IBM Corporation nor the names of its */ 36 /* -------------------------------------------------------------- */ 51 #define INV_SQRT_PI 5.6418958354775628694807945156077258584405062932899885684408572171064247E-1 58 #define TAYLOR_ERF_01 -3.3333333333333333333333333333333333333333333333333333333333333333333333E-1 59 #define TAYLOR_ERF_02 1.0000000000000000000000000000000000000000000000000000000000000000000000E-1 60 #define TAYLOR_ERF_03 -2.3809523809523809523809523809523809523809523809523809523809523809523810E-2 61 #define TAYLOR_ERF_04 4.6296296296296296296296296296296296296296296296296296296296296296296296E-3 [all …]
|
D | fdim.h | 39 /* fdim - compute the positive difference of x and y. 43 vec_double2 v; in _fdim() local 46 v = spu_promote(x - y, 0); in _fdim() 47 mask = (vec_uint4)spu_shuffle(v, v, VEC_SPLAT_U8(0)); in _fdim() 48 v = spu_andc(v, (vec_double2)spu_rlmaska(mask, -31)); in _fdim() 50 return (spu_extract(v, 0)); in _fdim()
|
/picolibc-latest/newlib/libc/posix/ |
D | regexec.c | 1 /*- 67 #define CLEAR(v) ((v) = 0) argument 68 #define SET0(v, n) ((v) &= ~((unsigned long)1 << (n))) argument 69 #define SET1(v, n) ((v) |= (unsigned long)1 << (n)) argument 70 #define ISSET(v, n) (((v) & ((unsigned long)1 << (n))) != 0) argument 76 #define SETUP(v) ((v) = 0) argument 80 #define ISSTATEIN(v, o) (((v) & (o)) != 0) argument 85 #define ISSETBACK(v, n) (((v) & ((unsigned long)here >> (n))) != 0) argument 114 #define CLEAR(v) memset(v, 0, m->g->nstates) argument 115 #define SET0(v, n) ((v)[n] = 0) argument [all …]
|
/picolibc-latest/test/ |
D | test-long-long.c | 2 * SPDX-License-Identifier: BSD-3-Clause 49 unsigned long long v = 0; 57 v = v * 10 + (c - '0'); 60 return v * sign; 66 long long v = 0; 77 case '-': 78 sign = -1; 84 v = v * 10 + (c - '0'); 87 return v * sign; 92 naive_utoa(char *buf, unsigned long long v) in naive_utoa() argument [all …]
|
D | printf_scanf.c | 2 * SPDX-License-Identifier: BSD-3-Clause 168 #define ERROR_MAX 1e-6 177 # define ERROR_MAX 1e-6 179 # define ERROR_MAX 1e-14 184 #define ERROR_MAX 1e-5 202 { .str = L"foo\n", .fmt = L"foo\nbar", .expect = -1 }, 203 { .str = L"foo\n", .fmt = L"foo bar", .expect = -1 }, 204 { .str = L"foo\n", .fmt = L"foo %d", .expect = -1 }, 205 { .str = L"foo\n", .fmt = L"foo\n%d", .expect = -1 }, 206 { .str = L"foon", .fmt = L"foonbar", .expect = -1 }, [all …]
|
D | long_double.c | 2 * SPDX-License-Identifier: BSD-3-Clause 45 * fall-through case statement annotations 51 /* Non-standard but supported by at least gcc and clang */ 74 e = scalbnl(1.0L, -ilogbl(expect)); in within_error() 76 difference = fabsl(expect - result) * e; in within_error() 88 long double diff = fabsl(expect - result); in check_long_double() 108 long long diff = expect - result; in check_long_long() 162 #define DEFAULT_PREC 0x1p-55L 163 #define SQRTL_PREC 0x1.0p-63L 167 #define DEFAULT_PREC 0x1p-105L [all …]
|
/picolibc-latest/newlib/libc/stdlib/ |
D | chacha_private.h | 20 chacha-merged.c version 20080118 25 /* $OpenBSD: chacha_private.h,v 1.3 2022/02/28 21:56:29 dtucker Exp $ */ 37 #define U8V(v) ((u8)(v)) argument 38 #define U32V(v) ((u32)(v)) argument 40 #define ROTL32(v, n) \ argument 41 (U32V((v) << (n)) | ((v) >> (32 - (n)))) 49 #define U32TO8_LITTLE(p, v) \ argument 51 (p)[0] = U8V((v) ); \ 52 (p)[1] = U8V((v) >> 8); \ 53 (p)[2] = U8V((v) >> 16); \ [all …]
|
/picolibc-latest/newlib/libc/machine/h8500/ |
D | mulsi3.c | 25 long v; member 42 if (a.v < 0) in __mulsi3() 45 a.v = - a.v; in __mulsi3() 47 if (b.v < 0) in __mulsi3() 49 s = 1-s; in __mulsi3() 50 b.v = - b.v; in __mulsi3() 60 pp1 = -pp1; in __mulsi3()
|
/picolibc-latest/newlib/libc/stdio/ |
D | sccl.c | 1 /*- 36 register int c, n, v; in __sccl() local 42 v = 1; /* default => accept */ in __sccl() 46 v = 0; /* default => reject */ in __sccl() 49 tab[n] = v; in __sccl() 51 return fmt - 1; /* format ended before closing ] */ in __sccl() 57 * The first character may be ']' (or '-') without being special; the in __sccl() 58 * last character may be '-'. in __sccl() 61 v = 1 - v; in __sccl() 64 tab[c] = v; /* take character c */ in __sccl() [all …]
|
/picolibc-latest/newlib/libm/math/ |
D | kf_tan.c | 1 /* kf_tan.c -- float version of k_tan.c 18 pio4 = 7.8539812565e-01, /* 0x3f490fda */ 19 pio4lo = 3.7748947079e-08, /* 0x33222168 */ 21 3.3333334327e-01, /* 0x3eaaaaab */ 22 1.3333334029e-01, /* 0x3e088889 */ 23 5.3968254477e-02, /* 0x3d5d0dd1 */ 24 2.1869488060e-02, /* 0x3cb327a4 */ 25 8.8632395491e-03, /* 0x3c11371f */ 26 3.5920790397e-03, /* 0x3b6b6916 */ 27 1.4562094584e-03, /* 0x3abede48 */ [all …]
|
D | k_tan.c | 15 * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854 19 * -1/tan (if k= -1) is returned. 22 * 1. Since tan(-x) = -tan(x), we need only to consider positive x. 23 * 2. if x < 2^-28 (hx<0x3e300000 0), return x with inexact if x!=0. 30 * |tan(x) 2 4 26 | -59.2 31 * |----- - (1+T1*x +T2*x +.... +T13*x )| <= 2 43 * 4. For x in [0.67434,pi/4], let y = pi/4 - x, then 44 * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y)) 45 * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y))) 54 pio4 = _F_64(7.85398163397448278999e-01), /* 0x3FE921FB, 0x54442D18 */ [all …]
|
D | kf_sin.c | 1 /* kf_sin.c -- float version of k_sin.c 18 static const float half = 5.0000000000e-01, /* 0x3f000000 */ 19 S1 = -1.6666667163e-01, /* 0xbe2aaaab */ 20 S2 = 8.3333337680e-03, /* 0x3c088889 */ 21 S3 = -1.9841270114e-04, /* 0xb9500d01 */ 22 S4 = 2.7557314297e-06, /* 0x3638ef1b */ 23 S5 = -2.5050759689e-08, /* 0xb2d72f34 */ 24 S6 = 1.5896910177e-10; /* 0x2f2ec9d3 */ 29 float z, r, v; in __kernel_sinf() local 33 if (ix < 0x32000000) /* |x| < 2**-27 */ in __kernel_sinf() [all …]
|
D | sf_pow.c | 1 /* ef_pow.c -- float version of e_pow.c. 27 dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */ 28 dp_l[] = { 0.0, 1.56322085e-06,}, /* 0x35d1cfdc */ 33 /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */ 34 L1 = 6.0000002384e-01, /* 0x3f19999a */ 35 L2 = 4.2857143283e-01, /* 0x3edb6db7 */ 36 L3 = 3.3333334327e-01, /* 0x3eaaaaab */ 37 L4 = 2.7272811532e-01, /* 0x3e8ba305 */ 38 L5 = 2.3066075146e-01, /* 0x3e6c3255 */ 39 L6 = 2.0697501302e-01, /* 0x3e53f142 */ [all …]
|
/picolibc-latest/newlib/libm/ld/ld128/ |
D | k_tanl.c | 22 * Domain [-0.67434, 0.67434], range ~[-3.37e-36, 1.982e-37] 23 * |tan(x)/x - t(x)| < 2**-117.8 (XXX should be ~1e-37) 28 T3 = 0x1.5555555555555555555555555553p-2L, 29 T5 = 0x1.1111111111111111111111111eb5p-3L, 30 T7 = 0x1.ba1ba1ba1ba1ba1ba1ba1b694cd6p-5L, 31 T9 = 0x1.664f4882c10f9f32d6bbe09d8bcdp-6L, 32 T11 = 0x1.226e355e6c23c8f5b4f5762322eep-7L, 33 T13 = 0x1.d6d3d0e157ddfb5fed8e84e27b37p-9L, 34 T15 = 0x1.7da36452b75e2b5fce9ee7c2c92ep-10L, 35 T17 = 0x1.355824803674477dfcf726649efep-11L, [all …]
|
D | k_sinl.c | 24 * Domain [-0.7854, 0.7854], range ~[-1.53e-37, 1.659e-37] 25 * |sin(x)/x - s(x)| < 2**-122.1 30 S1 = -0.16666666666666666666666666666666666606732416116558L, 32 S3 = -0.00019841269841269841269841269839935785325638310428717L, 33 S4 = 0.27557319223985890652557316053039946268333231205686e-5L, 34 S5 = -0.25052108385441718775048214826384312253862930064745e-7L, 35 S6 = 0.16059043836821614596571832194524392581082444805729e-9L, 36 S7 = -0.76471637318198151807063387954939213287488216303768e-12L, 37 S8 = 0.28114572543451292625024967174638477283187397621303e-14L; 40 S9 = -0.82206352458348947812512122163446202498005154296863e-17, [all …]
|
/picolibc-latest/newlib/libc/include/rpc/ |
D | xdr.h | 8 * - Redistributions of source code must retain the above copyright notice, 10 * - Redistributions in binary form must reproduce the above copyright notice, 13 * - Neither the name of Sun Microsystems, Inc. nor the names of its 31 * $FreeBSD: src/include/rpc/xdr.h,v 1.23 2003/03/07 13:19:40 nectar Exp $ 32 * $NetBSD: xdr.h,v 1.19 2000/07/17 05:00:45 matt Exp $ 52 * types and an external bit-string representation. Library supplied 53 * routines provide for the conversion on built-in C data types. These 55 * a type encode/decode routine for each user-defined type. 96 # define RNDUP(x) (((x) + BYTES_PER_XDR_UNIT - 1) & ~(BYTES_PER_XDR_UNIT - 1)) 98 #define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ [all …]
|
/picolibc-latest/newlib/libm/ld/ld80/ |
D | k_tanl.c | 22 * Domain [-0.67434, 0.67434], range ~[-2.25e-22, 1.921e-22] 23 * |tan(x)/x - t(x)| < 2**-71.9 30 T3hi = 0.33333333333333331, /* 0x15555555555555.0p-54 */ 31 T3lo = 1.8350121769317163e-17, /* 0x15280000000000.0p-108 */ 32 T5hi = 0.13333333333333336, /* 0x11111111111112.0p-55 */ 33 T5lo = 1.3051083651294260e-17, /* 0x1e180000000000.0p-109 */ 34 T7hi = 0.053968253968250494, /* 0x1ba1ba1ba1b827.0p-57 */ 35 T7lo = 3.1509625637859973e-18, /* 0x1d100000000000.0p-111 */ 36 pio4_hi = 0.78539816339744828, /* 0x1921fb54442d18.0p-53 */ 37 pio4_lo = 3.0628711372715500e-17, /* 0x11a80000000000.0p-107 */ [all …]
|
D | k_sinl.c | 21 * Domain [-0.7854, 0.7854], range ~[-1.89e-22, 1.915e-22] 22 * |sin(x)/x - s(x)| < 2**-72.1 29 S1hi = -0.16666666666666666, /* -0x15555555555555.0p-55 */ 30 S1lo = -9.2563760475949941e-18; /* -0x15580000000000.0p-109 */ 34 S1 = -0.166666666666666666671L; /* -0xaaaaaaaaaaaaaaab.0p-66 */ 38 S2 = 0.0083333333333333332, /* 0x11111111111111.0p-59 */ 39 S3 = -0.00019841269841269427, /* -0x1a01a01a019f81.0p-65 */ 40 S4 = 0.0000027557319223597490, /* 0x171de3a55560f7.0p-71 */ 41 S5 = -0.000000025052108218074604, /* -0x1ae64564f16cad.0p-78 */ 42 S6 = 1.6059006598854211e-10, /* 0x161242b90243b5.0p-85 */ [all …]
|
/picolibc-latest/newlib/libm/ld/ |
D | math_private_openbsd.h | 1 /* $OpenBSD: math_private.h,v 1.17 2014/06/02 19:31:17 kettenis Exp $ */ 82 #define GET_LDOUBLE_MSW64(v,d) \ argument 86 (v) = sh_u.parts64.msw; \ 91 #define SET_LDOUBLE_MSW64(d,v) \ argument 95 sh_u.parts64.msw = (v); \ 101 #define GET_LDOUBLE_LSW64(v,d) \ argument 105 (v) = sh_u.parts64.lsw; \ 128 /* Check for non-zero significand */ in isnanl_inline() 129 if (high << (64 - LDBL_MANH_SIZE) == 0 && low == 0) in isnanl_inline() 155 /* 128-bit long double */ [all …]
|
/picolibc-latest/newlib/libm/test/ |
D | convert.c | 37 /* soft floats on m68k have rounding bugs for 64-bit values */ 52 double v; in test_strtod() local 55 v = strtod(pd->string, &tail); in test_strtod() 56 if (tail - pd->string) { in test_strtod() 57 if (fabs(v) < DBL_MIN && !(pd->endscan & ENDSCAN_IS_ZERO)) { in test_strtod() 60 if (strncasecmp(pd->string, "0x", 2) == 0) in test_strtod() 65 } else if (isinf(v) && !(pd->endscan & ENDSCAN_IS_INF)) in test_strtod() 70 test_mok(v, pd->value, CONVERT_BITS_DOUBLE); in test_strtod() 71 test_iok(tail - pd->string, pd->endscan & ENDSCAN_MASK); in test_strtod() 78 float v; in test_strtof() local [all …]
|
/picolibc-latest/doc/ |
D | releasing.md | 9 ** 32-bit x86 10 ** RISC-V 11 ** ARM 32-bit 12 ** ARM 64-bit (aarch64) 18 * 64-bit x86 19 * 32-bit x86 20 * RISC-V, all targets (qemu) 21 * ARM 32-bit, almost all targets (qemu) 22 * ARM 64-bit 24 3. Use glibc test suite for RISC-V and ARM 32-bit: [all …]
|