Home
last modified time | relevance | path

Searched full:y (Results 1 – 25 of 350) sorted by relevance

12345678910>>...14

/picolibc-latest/test/
Dlong_double_vec.h4 { .line = __LINE__, .x = -10L, .y = 1 },
5 { .line = __LINE__, .x = -9.9L, .y = 1 },
6 { .line = __LINE__, .x = -9.8L, .y = 1 },
7 { .line = __LINE__, .x = -9.7L, .y = 1 },
8 { .line = __LINE__, .x = -9.6L, .y = 1 },
9 { .line = __LINE__, .x = -9.5L, .y = 1 },
10 { .line = __LINE__, .x = -9.4L, .y = 1 },
11 { .line = __LINE__, .x = -9.3L, .y = 1 },
12 { .line = __LINE__, .x = -9.2L, .y = 1 },
13 { .line = __LINE__, .x = -9.1L, .y = 1 },
[all …]
Dlong_double_gen.5c99 real x, y;
111 y = imprecise(f.f(imprecise(x, prec)), out_prec);
112 sy = sprintf("%.-eL", y);
113 } catch divide_by_zero(real x, real y) {
125 printf(" { .line = __LINE__, .x = %.-eL, .y = %s },\n", x, sy);
134 printf(" long double y = %s(%s[i].x);\n", f.name, vec);
135 …printf(" result += check_long_double(\"%s\", %s[i].line, %s, %s[i].y, y);\n", f.name, vec, …
219 real y;
222 y = ceil(x-0.5);
224 y = floor(x+0.5);
[all …]
/picolibc-latest/newlib/libm/ld/ld80/
De_lgammal_r.c202 long double y, z; in sin_pi() local
211 y = -x; /* x is assume negative */ in sin_pi()
217 z = floorl (y); in sin_pi()
218 if (z != y) in sin_pi()
220 y *= 0.5L; in sin_pi()
221 y = 2.0L*(y - floorl(y)); /* y = |x| mod 2.0 */ in sin_pi()
222 n = (int) (y*4.0L); in sin_pi()
228 y = zero; n = 0; /* y must be even */ in sin_pi()
233 z = y + two63; /* exact */ in sin_pi()
236 y = n; in sin_pi()
[all …]
De_hypotl.c13 /* hypotl(x,y)
16 * If (assume round-to-nearest) z=x*x+y*y
20 * So, compute sqrt(x*x+y*y) with some care as
23 * Assume x>y>0;
25 * 1. if x > 2y use
26 * x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y
28 * 2. if x <= 2y use
29 * t1*yy1+((x-y)*(x-y)+(t1*y2+t2*y))
31 * yy1= y with lower 32 bits chopped, y2 = y-yy1.
37 * hypot(x,y) is INF if x or y is +INF or -INF; else
[all …]
De_powl.c27 * long double x, y, z, powl();
29 * z = powl( x, y );
37 * x**y = exp( y log(x) ).
48 * The relative error of pow(x,y) can be estimated
49 * by y dl ln(2), where dl is the absolute error of
53 * the predicted relative error in the result is 2.3e-21 y .
60 * -1000 < y < 1000, y uniformly distributed.
63 * 0.99 < x < 1.01, 0 < y < 8700, uniformly distributed.
69 * pow overflow x**y > MAXNUM INFINITY
70 * pow underflow x**y < 1/MAXNUM 0.0
[all …]
Ds_remquol.c49 remquol(long double x, long double y, int *quo) in remquol() argument
58 GET_LDOUBLE_WORDS(esy,hy,ly,y); in remquol()
62 esy &= 0x7fff; /* |y| */ in remquol()
64 SET_LDOUBLE_EXP(y,esy); in remquol()
67 if((esy|hy|ly)==0 || /* y=0 */ in remquol()
70 ((hy&~LDBL_NBIT)|ly)!=0)) { /* or y is NaN */ in remquol()
72 return (x*y)/(x*y); in remquol()
80 goto fixup; /* |x|<|y| return x or x-y */ in remquol()
84 return Zero[sx!=0]; /* |x|=|y| return x*0*/ in remquol()
97 /* determine iy = ilogb(y) */ in remquol()
[all …]
Ds_nexttoward.c14 * nexttoward(x,y)
16 * direction toward y.
23 nexttoward(__float64 x, long double y) in nexttoward() argument
29 GET_LDOUBLE_WORDS(esy,hy,ly,y); in nexttoward()
31 iy = esy&0x7fff; /* |y| */ in nexttoward()
35 ((iy>=0x7fff)&&(hy|ly)!=0)) /* y is nan */ in nexttoward()
36 return (long double)x+y; in nexttoward()
37 if((long double) x==y) return y; /* x=y, return y */ in nexttoward()
44 if ((long double) x > y) { /* x > y, x -= ulp */ in nexttoward()
47 } else { /* x < y, x += ulp */ in nexttoward()
[all …]
Ds_nexttowardf.c16 nexttowardf(float x, long double y) in nexttowardf() argument
22 GET_LDOUBLE_WORDS(esy,hy,ly,y); in nexttowardf()
24 iy = esy&0x7fff; /* |y| */ in nexttowardf()
28 (iy>=0x7fff&&((hy|ly)!=0))) /* y is nan */ in nexttowardf()
29 return (long double)x+y; in nexttowardf()
30 if((long double) x==y) return y; /* x=y, return y */ in nexttowardf()
37 if((long double) x > y) { /* x > y, x -= ulp */ in nexttowardf()
39 } else { /* x < y, x += ulp */ in nexttowardf()
43 if((long double) x < y) { /* x < y, x -= ulp */ in nexttowardf()
45 } else { /* x > y, x += ulp */ in nexttowardf()
/picolibc-latest/newlib/libm/math/
Dsrf_lgamma.c93 float y, z; in sin_pif() local
101 y = -x; /* x is assume negative */ in sin_pif()
107 z = floorf(y); in sin_pif()
108 if (z != y) { /* inexact anyway */ in sin_pif()
109 y *= (float)0.5; in sin_pif()
110 y = (float)2.0 * (y - floorf(y)); /* y = |x| mod 2.0 */ in sin_pif()
111 n = (__int32_t)(y * (float)4.0); in sin_pif()
114 y = zero; in sin_pif()
115 n = 0; /* y must be even */ in sin_pif()
118 z = y + two23; /* exact */ in sin_pif()
[all …]
Dsr_lgamma.c161 __float64 y, z; in sin_pi() local
169 y = -x; /* x is assume negative */ in sin_pi()
175 z = floor64(y); in sin_pi()
176 if (z != y) { /* inexact anyway */ in sin_pi()
177 y *= _F_64(0.5); in sin_pi()
178 y = _F_64(2.0) * (y - floor64(y)); /* y = |x| mod 2.0 */ in sin_pi()
179 n = (__int32_t)(y * _F_64(4.0)); in sin_pi()
182 y = zero; in sin_pi()
183 n = 0; /* y must be even */ in sin_pi()
186 z = y + two52; /* exact */ in sin_pi()
[all …]
Ds_sqrt.c22 * Scale x to y in [1,4) with even powers of 2:
23 * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then
24 * sqrt(x) = 2^k * sqrt(y)
26 * Let q = sqrt(y) truncated to i bit after binary point (q = 1),
29 * s = 2*q , and y = 2 * ( y - q ). (1)
36 * (q + 2 ) <= y. (2)
45 * s + 2 <= y (3)
48 * The advantage of (3) is that s and y can be computed by
53 * s = s , y = y ; (4)
58 * s = s + 2 , y = y - s - 2 (5)
[all …]
Ds_hypot.c14 /* hypot(x,y)
17 * If (assume round-to-nearest) z=x*x+y*y
21 * So, compute sqrt(x*x+y*y) with some care as
24 * Assume x>y>0;
26 * 1. if x > 2y use
27 * x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y
29 * 2. if x <= 2y use
30 * t1*y1+((x-y)*(x-y)+(t1*y2+t2*y))
32 * y1= y with lower 32 bits chopped, y2 = y-y1.
38 * hypot(x,y) is INF if x or y is +INF or -INF; else
[all …]
Ds_rem_pio2.c15 /* __rem_pio2(x,y)
17 * return the remainder of x rem pi/2 in y[0]+y[1]
73 __rem_pio2(__float64 x, __float64 *y) in __rem_pio2() argument
85 y[0] = x; in __rem_pio2()
86 y[1] = 0; in __rem_pio2()
93 y[0] = z - pio2_1t; in __rem_pio2()
94 y[1] = (z - y[0]) - pio2_1t; in __rem_pio2()
97 y[0] = z - pio2_2t; in __rem_pio2()
98 y[1] = (z - y[0]) - pio2_2t; in __rem_pio2()
104 y[0] = z + pio2_1t; in __rem_pio2()
[all …]
Dsf_rem_pio2.c17 /* __rem_pio2f(x,y)
19 * return the remainder of x rem pi/2 in y[0]+y[1]
81 __rem_pio2f(float x, float *y) in __rem_pio2f() argument
92 y[0] = x; in __rem_pio2f()
93 y[1] = 0; in __rem_pio2f()
100 y[0] = z - pio2_1t; in __rem_pio2f()
101 y[1] = (z - y[0]) - pio2_1t; in __rem_pio2f()
104 y[0] = z - pio2_2t; in __rem_pio2f()
105 y[1] = (z - y[0]) - pio2_2t; in __rem_pio2f()
111 y[0] = z + pio2_1t; in __rem_pio2f()
[all …]
Dk_tan.c14 /* __kernel_tan( x, y, k )
17 * Input y is the tail of x.
34 * Note: tan(x+y) = tan(x) + tan'(x)*y
35 * ~ tan(x) + (1+x*x)*y
36 * Therefore, for better accuracy in computing tan(x+y), let
41 * tan(x+y) = x + (T1*x + (x *(r+y)+y))
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)))
73 __kernel_tan(__float64 x, __float64 y, int iy) in __kernel_tan() argument
[all …]
/picolibc-latest/newlib/libm/ld/ld128/
De_hypotl.c13 /* hypotl(x,y)
16 * If (assume round-to-nearest) z=x*x+y*y
20 * So, compute sqrtl(x*x+y*y) with some care as
23 * Assume x>y>0;
25 * 1. if x > 2y use
26 * x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y
28 * 2. if x <= 2y use
29 * t1*yy1+((x-y)*(x-y)+(t1*y2+t2*y))
31 * yy1= y with lower 64 bits chopped, y2 = y-yy1.
37 * hypotl(x,y) is INF if x or y is +INF or -INF; else
[all …]
Ds_nexttoward.c14 * nexttoward(x,y)
16 * direction toward y.
23 nexttoward64(__float64 x, long double y) in nexttoward64() argument
31 GET_LDOUBLE_WORDS64(hy,ly,y); in nexttoward64()
33 iy = hy&0x7fffffffffffffffLL; /* |y| */ in nexttoward64()
36 force_eval_long_double(opt_barrier_long_double(y)+y); in nexttoward64()
39 if((iy>=0x7fff000000000000LL)&&((iy-0x7fff000000000000LL)|ly)!=0) { /* y is nan */ in nexttoward64()
40 return (__float64) (y + y); in nexttoward64()
42 if((long double) x==y) return y; /* x=y, return y */ in nexttoward64()
49 if ((long double) x > y) { /* x > y, x -= ulp */ in nexttoward64()
[all …]
Ds_nexttowardf.c16 nexttowardf(float x, long double y) in nexttowardf() argument
23 GET_LDOUBLE_WORDS64(hy,ly,y); in nexttowardf()
25 iy = hy&0x7fffffffffffffffLL; /* |y| */ in nexttowardf()
28 force_eval_long_double(opt_barrier_long_double(y)+y); in nexttowardf()
31 if((iy>=0x7fff000000000000LL)&&((iy-0x7fff000000000000LL)|ly)!=0) { /* y is nan */ in nexttowardf()
32 return (float) (y + y); in nexttowardf()
34 if((long double) x==y) return y; /* x=y, return y */ in nexttowardf()
41 if((long double) x > y) { /* x > y, x -= ulp */ in nexttowardf()
43 } else { /* x < y, x += ulp */ in nexttowardf()
47 if((long double) x < y) { /* x < y, x -= ulp */ in nexttowardf()
[all …]
Ds_nextafterl.c14 * nextafterl(x,y)
16 * direction toward y.
23 nextafterl(long double x, long double y) in nextafterl() argument
29 GET_LDOUBLE_WORDS64(hy,ly,y); in nextafterl()
31 iy = hy&0x7fffffffffffffffLL; /* |y| */ in nextafterl()
34 ((iy>=0x7fff000000000000LL)&&((iy-0x7fff000000000000LL)|ly)!=0)) /* y is nan */ in nextafterl()
35 return x+y; in nextafterl()
36 if(x==y) return y; /* x=y, return y */ in nextafterl()
43 if(hx>hy||((hx==hy)&&(lx>ly))) { /* x > y, x -= ulp */ in nextafterl()
46 } else { /* x < y, x += ulp */ in nextafterl()
[all …]
Ds_remquol.c51 remquol(long double x, long double y, int *quo) in remquol() argument
59 GET_LDOUBLE_WORDS64(hy,ly,y); in remquol()
63 hy &= 0x7fffffffffffffffLL; /* |y| */ in remquol()
65 SET_LDOUBLE_WORDS64(y,hy,ly); in remquol()
68 if((hy|ly)==0 || /* y=0 */ in remquol()
71 (((hy&0x0000ffffffffffffLL)&~LDBL_NBIT)|ly)!=0)) /* or y is NaN */ in remquol()
72 return (x*y)/(x*y); in remquol()
79 goto fixup; /* |x|<|y| return x or x-y */ in remquol()
84 return Zero[sx!=0]; /* |x|=|y| return x*0*/ in remquol()
97 /* determine iy = ilogb(y) */ in remquol()
[all …]
/picolibc-latest/newlib/libm/machine/spu/headers/
Dsimdmath.h83 vector float atan2f4(vector float y, vector float x);
86 vector float copysignf4(vector float x, vector float y);
89 vector float divf4(vector float x, vector float y);
90 vector float divf4_fast(vector float x, vector float y);
99 vector float fdimf4(vector float x, vector float y);
101 vector float fmaf4(vector float x, vector float y, vector float z);
102 vector float fmaxf4(vector float x, vector float y);
103 vector float fminf4(vector float x, vector float y);
104 vector float fmodf4(vector float x, vector float y);
107 vector float hypotf4(vector float x, vector float y);
[all …]
/picolibc-latest/newlib/libm/common/
Dpow.c1 /* Double-precision x^y function.
56 /* Compute y+TAIL = log(x) where the rounded result is y and TAIL has about
63 double_t z, r, y, invc, logc, logctail, kd, hi, t1, t2, lo, lo1, lo2, p; in log_inline() local
124 y = hi + lo; in log_inline()
125 *tail = hi - y + lo; in log_inline()
126 return y; in log_inline()
153 double_t scale, y; in specialcase() local
160 y = 0x1p1009 * (scale + scale * tmp); in specialcase()
161 return check_oflow (y); in specialcase()
167 y = scale + scale * tmp; in specialcase()
[all …]
Dsf_remquo.c37 remquof(float x, float y, int *quo) in remquof() argument
43 GET_FLOAT_WORD(hy,y); in remquof()
47 hy &= 0x7fffffff; /* |y| */ in remquof()
50 if(hy==0||hx>=0x7f800000||hy>0x7f800000) { /* y=0,NaN;or x not finite */ in remquof()
52 return (x*y)/(x*y); in remquof()
56 goto fixup; /* |x|<|y| return x or x-y */ in remquof()
59 return Zero[(__uint32_t)sx>>31]; /* |x|=|y| return x*0*/ in remquof()
67 /* determine iy = ilogb(y) */ in remquof()
68 if(hy<0x00800000) { /* subnormal y */ in remquof()
72 /* set up {hx,lx}, {hy,ly} and align y to x */ in remquof()
[all …]
Ds_remquo.c24 double remquo(double <[x]>, double <[y]>, int *<[quo]>);
25 float remquof(float <[x]>, float <[y]>, int *<[quo]>);
29 functions; this value is in the range -<[y]>/2 ... +<[y]>/2. In the object
30 pointed to by <<quo>> they store a value whose sign is the sign of <<x>>/<<y>>
32 quotient of <<x>>/<<y>>. (That is, <<quo>> is given the n lsbs of the
45 When either argument is NaN, NaN is returned. If <[y]> is 0 or <[x]> is
49 Otherwise, the <<remquo>> functions return <[x]> REM <[y]>.
86 remquo64(__float64 x, __float64 y, int *quo) in remquo64() argument
92 EXTRACT_WORDS(hy,ly,y); in remquo64()
96 hy &= 0x7fffffff; /* |y| */ in remquo64()
[all …]
Ds_fdim.c16 double fdim(double <[x]>, double <[y]>);
17 float fdimf(float <[x]>, float <[y]>);
22 . <[x]> - <[y]> if <[x]> > <[y]>, or
24 . +0 if <[x]> <= <[y]>, or
27 . +0 if <[x]> $\leq$ <[y]>, or
45 fdim64(__float64 x, __float64 y) in fdim64() argument
47 if (isnan(x) || isnan(y)) return(x+y); in fdim64()
49 __float64 z = x > y ? x - y : _F_64(0.0); in fdim64()
50 if (!isinf(x) && !isinf(y)) in fdim64()

12345678910>>...14