/picolibc-latest/newlib/libm/ld/ld128/ |
D | e_logl.c | 43 * log(1+x) = x - 0.5 x^2 + x^3 P(x) . 65 /* log(1+x) = x - .5 x^2 + x^3 l(x) 77 l11 = 9.090909090915566247008015301349979892689E-2L, 78 l12 = -8.333333211818065121250921925397567745734E-2L, 79 l13 = 7.692307559897661630807048686258659316091E-2L, 80 l14 = -7.144242754190814657241902218399056829264E-2L, 81 l15 = 6.668057591071739754844678883223432347481E-2L; 87 -5.5345593589352099112142921677820359632418E-2L, 88 -5.2108257402767124761784665198737642086148E-2L, 89 -4.8991686870576856279407775480686721935120E-2L, [all …]
|
D | s_expm1l.c | 42 * e = 2 e. 44 * An expansion x + .5 x^2 + x^3 R(x) approximates exp(f) - 1 45 * in the basic range [-0.5 ln 2, 0.5 ln 2]. 58 /* exp(x) - 1 = x + 0.5 x^2 + x^3 P(x)/Q(x) 59 -.5 ln 2 < x < .5 ln 2 80 /* C1 + C2 = ln 2 */ 84 /* ln (2^16384 * (1 - 2^-113)) */ 86 /* ln 2^-114 */ 130 /* Express x = ln 2 (k + remainder), remainder not exceeding 1/2. */ in expm1l() 131 xx = C1 + C2; /* ln 2. */ in expm1l() [all …]
|
D | e_log10l.c | 41 * log(1+x) = x - 0.5 x^2 + x^3 P(x)/Q(x). 43 * Otherwise, setting z = 2(x-1)/x+1), 64 /* Coefficients for ln(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 65 * 1/sqrt(2) <= x < sqrt(2) 102 /* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2), 103 * where z = 2(x-1)/(x+1) 104 * 1/sqrt(2) <= x < sqrt(2) 129 /* log10(2) */ 131 L102B = -1.14700043360188047862611052755069732318101185E-2L, 134 L10EB = -6.570551809674817234887108108339491770560299E-2L, [all …]
|
D | e_log2l.c | 20 * Base 2 logarithm, 128-bit long double precision 34 * Returns the base 2 logarithm of x. 40 * log(1+x) = x - 0.5 x^2 + x^3 P(x)/Q(x). 42 * Otherwise, setting z = 2(x-1)/x+1), 63 /* Coefficients for ln(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 64 * 1/sqrt(2) <= x < sqrt(2) 101 /* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2), 102 * where z = 2(x-1)/(x+1) 103 * 1/sqrt(2) <= x < sqrt(2) 130 /* sqrt(2)/2 */ [all …]
|
D | s_log1pl.c | 42 * log(1+x) = x - 0.5 x^2 + x^3 P(x)/Q(x). 44 * Otherwise, setting z = 2(w-1)/(w+1), 59 /* Coefficients for log(1+x) = x - x^2 / 2 + x^3 P(x)/Q(x) 60 * 1/sqrt(2) <= 1+x < sqrt(2) 92 /* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2), 93 * where z = 2(x-1)/(x+1) 94 * 1/sqrt(2) <= x < sqrt(2) 113 /* C1 + C2 = ln 2 */ 118 /* ln (2^16384 * (1 - 2^-113)) */ 156 /* Logarithm using log(x) = z + z^3 P(z^2)/Q(z^2), in log1pl() [all …]
|
/picolibc-latest/newlib/libm/test/ |
D | iconv_vec.c | 312 #if TEST_PART == 2 || TEST_PART == -1 408 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x7fffffff,12,34,0x7fffffff,12,34,0x00000000, 2, 0, " 0… 409 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x000000a7, 5, 0,0x000000a7, 5, 0,0x00000000, 2, 0, " 0… 410 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x00000a73, 6, 0,0x00000a73, 6, 0,0x00000000, 2, 0, " 0… 411 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x000000a7, 5, 0,0x000000a7, 5, 0,0x00000000, 2, 0, " 0… 412 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x7fffffff,15,34,0x7fffffff,15,34,0x00000000, 2, 0, " 0… 413 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x000a1241, 8, 0,0x000a1241, 8, 0,0x00000000, 2, 0, " 0… 414 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x00a12413, 9, 0,0x00a12413, 9, 0,0x00000000, 2, 0, " 0… 415 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x000a1241, 8, 0,0x000a1241, 8, 0,0x00000000, 2, 0, " 0… 416 {__LINE__,0x00000000, 2, 0,0x00000000, 2, 0,0x7fffffff,12,34,0x7fffffff,12,34,0x00000000, 2, 0, " 0… [all …]
|
D | dvec.c | 22 {__LINE__, 5.888272965262503e-03,"5888273",7,-2,0,"58883",7,-2,0,"0.005888273",7,NULL}, 31 {__LINE__, 6.911970810510094e-03,"691197",6,-2,0,"6912",6,-2,0,"0.00691197",6,NULL}, 35 {__LINE__, 4.198600486581023e+23,"42",2,24,0,"41986004865810231931699200",2,24,0,"4.2e+23",2,NULL}, 36 {__LINE__, 6.626748168931517e-22,"66",2,-21,0,"",2,-2,0,"6.6e-22",2,NULL}, 46 {__LINE__, 1.529207539606606e-03,"15292",5,-2,0,"153",5,-2,0,"0.0015292",5,NULL}, 55 {__LINE__, 1.022516585955060e-21,"10",2,-20,0,"",2,-2,0,"1e-21",2,NULL}, 63 {__LINE__, 1.586825853752952e-28,"2",1,-27,0,"",1,-1,0,"2e-28",1,NULL}, 67 {__LINE__, 2.337051102431064e+03,"2",1,4,0,"23371",1,4,0,"2e+03",1,NULL}, 77 {__LINE__, 1.632057742810541e-14,"2",1,-13,0,"",1,-1,0,"2e-14",1,NULL}, 87 {__LINE__, 1.741790451299310e-05,"2",1,-4,0,"",1,-1,0,"2e-05",1,NULL}, [all …]
|
/picolibc-latest/newlib/libc/tinystdio/ryu/ |
D | digit_table.h | 23 '0','0','0','1','0','2','0','3','0','4','0','5','0','6','0','7','0','8','0','9', 24 '1','0','1','1','1','2','1','3','1','4','1','5','1','6','1','7','1','8','1','9', 25 '2','0','2','1','2','2','2','3','2','4','2','5','2','6','2','7','2','8','2','9', 26 '3','0','3','1','3','2','3','3','3','4','3','5','3','6','3','7','3','8','3','9', 27 '4','0','4','1','4','2','4','3','4','4','4','5','4','6','4','7','4','8','4','9', 28 '5','0','5','1','5','2','5','3','5','4','5','5','5','6','5','7','5','8','5','9', 29 '6','0','6','1','6','2','6','3','6','4','6','5','6','6','6','7','6','8','6','9', 30 '7','0','7','1','7','2','7','3','7','4','7','5','7','6','7','7','7','8','7','9', 31 '8','0','8','1','8','2','8','3','8','4','8','5','8','6','8','7','8','8','8','9', 32 '9','0','9','1','9','2','9','3','9','4','9','5','9','6','9','7','9','8','9','9'
|
/picolibc-latest/newlib/libc/misc/ |
D | unctrl.c | 42 * 2. Redistributions in binary form must reproduce the above copyright 74 "0", "1", "2", "3", "4", "5", "6", "7", 104 2, 2, 2, 2, 2, 2, 2, 2, 105 2, 2, 2, 2, 2, 2, 2, 2, 106 2, 2, 2, 2, 2, 2, 2, 2, 107 2, 2, 2, 2, 2, 2, 2, 2, 119 1, 1, 1, 1, 1, 1, 1, 2,
|
/picolibc-latest/newlib/libm/math/ |
D | s_jn.c | 15 * floating point Bessel's function of the 1st and 2nd kind 21 * Note 2. About jn(n,x), yn(n,x) 83 /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ in jn64() 84 if (ix >= 0x52D00000) { /* x > 2**302 */ in jn64() 85 /* (x >> n**2) in jn64() 86 * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi) in jn64() 87 * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi) in jn64() 89 * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then in jn64() 95 * 2 -s+c -c-s in jn64() 106 case 2: in jn64() [all …]
|
D | s_asin.c | 18 * asin(x) = x + x*x^2*R(x^2) 20 * R(x^2) is a rational approximation of (asin(x)-x)/x^3 22 * |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75) 25 * asin(x) = pi/2-2*asin(sqrt((1-x)/2)) 26 * Let y = (1-x), z = y/2, s := sqrt(z), and pio2_hi+pio2_lo=pi/2; 28 * asin(x) = pi/2 - 2*(s+s*z*R(z)) 29 * = pio2_hi - (2*(s+s*z*R(z)) - pio2_lo) 30 * For x<=0.98, let pio4_hi = pio2_hi/2, then 34 * asin(x) = pi/2 - 2*(s+s*z*R(z)) 35 * = pio4_hi+(pio4-2s)-(2s*z*R(z)-pio2_lo) [all …]
|
D | s_acos.c | 16 * acos(x) = pi/2 - asin(x) 17 * acos(-x) = pi/2 + asin(x) 19 * acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c) 21 * acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2))) 22 * = 2asin(sqrt((1-x)/2)) 23 * = 2s + 2s*z*R(z) ...z=(1-x)/2, s=sqrt(z) 24 * = 2f + (2c + 2s*z*R(z)) 28 * acos(x) = pi - 2asin(sqrt((1-|x|)/2)) 29 * = pi - 0.5*(s+s*z*R(z)), where z=(1-|x|)/2,s=sqrt(z) 78 return pio2_hi + pio2_lo; /*if|x|<2**-57*/ in acos64()
|
/picolibc-latest/newlib/libm/common/ |
D | log2_data.c | 11 2. Redistributions in binary form must reproduce the above copyright 42 // relative error: 0x1.2fad8188p-63 45 0x1.ec709dc3a03f7p-2, 46 -0x1.71547652b7c3fp-2, 47 0x1.2776c50f05be4p-2, 62 0x1.ec709dc3a04bep-2, 63 -0x1.7154764702ffbp-2, 64 0x1.2776c50034c48p-2, 71 x = 2^k z 83 where c is near the center of the subinterval and is chosen by trying +-2^29 [all …]
|
D | sf_pow.c | 11 2. Redistributions in binary form must reproduce the above copyright 40 ULP error: 0.82 (~ 0.5 + relerr*2^24) 41 relerr: 1.27 * 2^-26 (Relative error ~= 128*Ln2*relerr_log2 + relerr_exp2) 42 relerr_log2: 1.83 * 2^-33 (Relative error of logx.) 43 relerr_exp2: 1.69 * 2^-34 (Relative error of exp2(ylogx).) 56 /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */ in log2_inline() 61 /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. in log2_inline() 80 p = A[2] * r + A[3]; in log2_inline() 101 /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */ in exp2_inline() 106 /* N*x = k + r with r in [-1/2, 1/2] */ in exp2_inline() [all …]
|
D | s_expm1.c | 46 the System V Interface Definition (Issue 2). 61 * 2. Approximating expm1(r) by a special rational function on 64 * r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 - r^4/360 + ... 66 * r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 * R1(r*r) 68 * R1(r**2) = 6/r *((exp(r)+1)/(exp(r)-1) - 2/r) 70 * = 1 - r^2/60 + r^4/2520 - r^6/100800 + ... 74 * by 2**-61. In other words, 75 * R1(z) ~ 1.0 + Q1*z + Q2*z**2 + Q3*z**3 + Q4*z**4 + Q5*z**5 76 * where Q1 = -1.6666666666666567384E-2, 84 * | 1.0+Q1*z+...+Q5*z - R1(z) | <= 2 [all …]
|
D | pow.c | 11 2. Redistributions in binary form must reproduce the above copyright 37 Worst-case error: 0.54 ULP (~= ulperr_exp + 1024*Ln2*relerr_log*2^53) 38 relerr_log: 1.3 * 2^-68 (Relative error of log, 1.5 * 2^-68 without fma) 62 /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */ in log_inline() 67 /* x = 2^k z; where z is in range [OFF,2*OFF) and exact. in log_inline() 82 /* Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and in log_inline() 121 * (A[1] + r * A[2] + ar2 * (A[3] + r * A[4] + ar2 * (A[5] + r * A[6])))); in log_inline() 168 #if FLT_EVAL_METHOD == 2 in specialcase() 175 range to avoid double rounding that can cause 0.5+E/2 ulp error where in specialcase() 197 /* Computes sign*exp(x+xtail) where |xtail| < 2^-8/N and |xtail| <= |x|. [all …]
|
D | exp2.c | 1 /* Double-precision 2^x function. 11 2. Redistributions in binary form must reproduce the above copyright 41 #define C3 __exp_data.exp2_poly[2] 63 y = 2 * (scale + scale * tmp); in specialcase() 73 range to avoid double rounding that can cause 0.5+E/2 ulp error where in specialcase() 103 /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */ in exp2() 124 if (2 * asuint64 (x) > 2 * asuint64 (928.0)) in exp2() 129 /* exp2(x) = 2^(k/N) * 2^r, with 2^r in [2^(-1/2N),2^(1/2N)]. */ in exp2() 130 /* x = k/N + r, with int k and r in [-1/2N, 1/2N]. */ in exp2() 135 /* 2^(k/N) ~= scale * (1 + tail). */ in exp2() [all …]
|
D | pow_log_data.c | 11 2. Redistributions in binary form must reproduce the above copyright 45 0x1.555555555556p-2 * -2, 46 -0x1.0000000000006p-2 * -2, 55 x = 2^k z 69 1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2 78 A(0x1.6a00000000000p+0, -0x1.62c82f2b9c800p-2, 0x1.ab42428375680p-48) 79 A(0x1.6800000000000p+0, -0x1.5d1bdbf580800p-2, -0x1.ca508d8e0f720p-46) 80 A(0x1.6600000000000p+0, -0x1.5767717455800p-2, -0x1.362a4d5b6506dp-45) 81 A(0x1.6400000000000p+0, -0x1.51aad872df800p-2, -0x1.684e49eb067d5p-49) 82 A(0x1.6200000000000p+0, -0x1.4be5f95777800p-2, -0x1.41b6993293ee0p-47) [all …]
|
/picolibc-latest/newlib/libm/ld/ld80/ |
D | e_log10l.c | 41 * log(1+x) = x - 0.5 x**2 + x**3 P(x)/Q(x). 43 * Otherwise, setting z = 2(x-1)/x+1), 68 /* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 69 * 1/sqrt(2) <= x < sqrt(2) 92 /* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2), 93 * where z = 2(x-1)/(x+1) 94 * 1/sqrt(2) <= x < sqrt(2) 110 /* log10(2) */ 112 #define L102B -1.1470004336018804786261e-2L 115 #define L10EB -6.5705518096748172348871e-2L [all …]
|
D | s_expm1l.c | 41 * e = 2 e. 43 * An expansion x + .5 x^2 + x^3 R(x) approximates exp(f) - 1 44 * in the basic range [-0.5 ln 2, 0.5 ln 2]. 63 /* exp(x) - 1 = x + 0.5 x^2 + x^3 P(x)/Q(x) 64 -.5 ln 2 < x < .5 ln 2 81 /* C1 + C2 = ln 2 */ 84 /* ln 2^-65 */ 115 /* Express x = ln 2 (k + remainder), remainder not exceeding 1/2. */ in expm1l() 118 /* remainder times ln 2 */ in expm1l() 122 /* Approximate exp(remainder ln 2). */ in expm1l() [all …]
|
D | e_log2l.c | 21 * Base 2 logarithm, long double precision 35 * Returns the base 2 logarithm of x. 41 * log(1+x) = x - 0.5 x**2 + x**3 P(x)/Q(x). 43 * Otherwise, setting z = 2(x-1)/x+1), 68 /* Coefficients for ln(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 69 * 1/sqrt(2) <= x < sqrt(2) 92 /* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2), 93 * where z = 2(x-1)/(x+1) 94 * 1/sqrt(2) <= x < sqrt(2) 144 * where z = 2(x-1)/x+1) in log2l() [all …]
|
D | e_logl.c | 41 * log(1+x) = x - 0.5 x**2 + x**3 P(x)/Q(x). 43 * Otherwise, setting z = 2(x-1)/x+1), 68 /* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 69 * 1/sqrt(2) <= x < sqrt(2) 91 /* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2), 92 * where z = 2(x-1)/(x+1) 93 * 1/sqrt(2) <= x < sqrt(2) 141 * where z = 2(x-1)/x+1) in logl() 143 if( (e > 2) || (e < -2) ) in logl() 146 { /* 2( 2x-1 )/( 2x+1 ) */ in logl() [all …]
|
/picolibc-latest/newlib/libc/machine/m68hc11/ |
D | setjmp.S | 21 # define val 2 41 sty 2,x 67 movw 0,sp,2,x+ 68 sts 2,x+ 69 movw _.frame,2,x+ 70 movw _.d1,2,x+ 71 movw _.d2,2,x+ 72 movw _.d3,2,x+ 73 movw _.d4,2,x+ 74 movw _.d5,2,x+ [all …]
|
/picolibc-latest/newlib/testsuite/newlib.string/ |
D | tstring.c | 13 #if defined(__SPU__) || __SIZEOF_SIZE_T__ == 2 27 #define MAX_2 (2 * MAX_1 + MAX_1 / 10) 120 tmp2[2] = 'A'; in main() 136 tmp2[2] = 'A'; in main() 146 strncpy (tmp2, "X", 2) != tmp2 || in main() 154 memchr (target, 'X', 2) != target || in main() 156 memchr (target, 'Y', 2) != NULL || in main() 159 strncmp (tmp3, target, 2) || in main() 169 memset (target, 'Y', 2) != target) in main() 175 target[2] = '\0'; in main() [all …]
|
/picolibc-latest/newlib/libm/machine/spu/headers/ |
D | atanhd2.h | 54 * atanh x = 1/2 * ln((1 + x)/(1 - x)) = 1/2 * [ln(1+x) - ln(1-x)] 76 #define SMD_DP_ATANH_MAC11 9.090909090909090909090909090909E-2 77 #define SMD_DP_ATANH_MAC13 7.692307692307692307692307692308E-2 78 #define SMD_DP_ATANH_MAC15 6.666666666666666666666666666667E-2 79 #define SMD_DP_ATANH_MAC17 5.882352941176470588235294117647E-2 81 #define SMD_DP_ATANH_MAC19 5.263157894736842105263157894737E-2 82 #define SMD_DP_ATANH_MAC21 4.761904761904761904761904761905E-2 83 #define SMD_DP_ATANH_MAC23 4.347826086956521739130434782609E-2 84 #define SMD_DP_ATANH_MAC25 4.000000000000000000000000000000E-2 85 #define SMD_DP_ATANH_MAC27 3.703703703703703703703703703704E-2 [all …]
|