Home
last modified time | relevance | path

Searched refs:u (Results 1 – 25 of 86) sorted by relevance

1234

/picolibc-3.7.0-3.6.0/newlib/libm/ld/common/
De_sqrtl.c34 union IEEEl2bits u; in inc() local
36 u.e = x; in inc()
37 if (++u.bits.manl == 0) { in inc()
38 if (++u.bits.manh == 0) { in inc()
39 u.bits.exp++; in inc()
40 u.bits.manh |= LDBL_NBIT; in inc()
43 return (u.e); in inc()
50 union IEEEl2bits u; in dec() local
52 u.e = x; in dec()
53 if (u.bits.manl-- == 0) { in dec()
[all …]
Ds_scalbnl.c32 union IEEEl2bits u; in scalbnl() local
34 u.e = x; in scalbnl()
35 k = u.bits.exp; /* extract exponent */ in scalbnl()
37 if ((u.bits.manh|u.bits.manl)==0) return x; /* +-0 */ in scalbnl()
38 u.e *= 0x1p+128L; in scalbnl()
39 k = u.bits.exp - 128; in scalbnl()
40 if (n< -50000) return __math_uflowl(u.bits.sign); in scalbnl()
45 return __math_oflowl(u.bits.sign); /*overflow*/ in scalbnl()
48 if (k >= 0x7fff) return __math_oflowl(u.bits.sign); /* overflow */ in scalbnl()
50 {u.bits.exp = k; return u.e;} in scalbnl()
[all …]
Ds_fmaxl.c33 union IEEEl2bits u[2]; in fmaxl() local
40 u[0].e = x; in fmaxl()
41 mask_nbit_l(u[0]); in fmaxl()
42 u[1].e = y; in fmaxl()
43 mask_nbit_l(u[1]); in fmaxl()
46 if (u[0].bits.exp == LDBL_INF_NAN_EXP && (u[0].bits.manh | u[0].bits.manl) != 0) in fmaxl()
48 if (u[1].bits.exp == LDBL_INF_NAN_EXP && (u[1].bits.manh | u[1].bits.manl) != 0) in fmaxl()
52 if (u[0].bits.sign != u[1].bits.sign) in fmaxl()
53 return (u[0].bits.sign ? y : x); in fmaxl()
Ds_fminl.c33 union IEEEl2bits u[2]; in fminl() local
40 u[0].e = x; in fminl()
41 mask_nbit_l(u[0]); in fminl()
42 u[1].e = y; in fminl()
43 mask_nbit_l(u[1]); in fminl()
46 if (u[0].bits.exp == LDBL_INF_NAN_EXP && (u[0].bits.manh | u[0].bits.manl) != 0) in fminl()
48 if (u[1].bits.exp == LDBL_INF_NAN_EXP && (u[1].bits.manh | u[1].bits.manl) != 0) in fminl()
52 if (u[0].bits.sign != u[1].bits.sign) in fminl()
53 return (u[1].bits.sign ? y : x); in fminl()
Ds_frexpl.c37 union IEEEl2bits u; in frexpl() local
39 u.e = x; in frexpl()
40 switch (u.bits.exp) { in frexpl()
42 if ((u.bits.manl | u.bits.manh) == 0) { in frexpl()
45 u.e *= 0x1.0p514L; in frexpl()
46 *ex = u.bits.exp - 0x4200; in frexpl()
47 u.bits.exp = 0x3ffe; in frexpl()
53 *ex = u.bits.exp - 0x3ffe; in frexpl()
54 u.bits.exp = 0x3ffe; in frexpl()
57 return (u.e); in frexpl()
Ds_logbl.c17 union IEEEl2bits u; in logbl() local
21 u.e = x; in logbl()
22 if (u.bits.exp == 0) { in logbl()
23 if ((u.bits.manl | u.bits.manh) == 0) { /* x == 0 */ in logbl()
24 u.bits.sign = 1; in logbl()
25 return (1.0L / u.e); in logbl()
29 if (u.bits.manh == 0) { in logbl()
31 for (b = LDBL_MANH_SIZE; !(u.bits.manl & m); m >>= 1) in logbl()
37 for (b = 0; !(u.bits.manh & m); m >>= 1) in logbl()
45 if (u.bits.exp < (LDBL_MAX_EXP << 1) - 1) /* normal */ in logbl()
[all …]
Ds_ilogbl.c20 union IEEEl2bits u; in ilogbl() local
24 u.e = x; in ilogbl()
25 if (u.bits.exp == 0) { in ilogbl()
26 if ((u.bits.manl | u.bits.manh) == 0) { in ilogbl()
32 if (u.bits.manh == 0) { in ilogbl()
34 for (b = LDBL_MANH_SIZE; !(u.bits.manl & m); m >>= 1) in ilogbl()
40 for (b = 0; !(u.bits.manh & m); m >>= 1) in ilogbl()
47 } else if (u.bits.exp < (LDBL_MAX_EXP << 1) - 1) in ilogbl()
48 return (u.bits.exp - LDBL_MAX_EXP + 1); in ilogbl()
49 else if (u.bits.manl != 0 || u.bits.manh != 0) { in ilogbl()
Ds_fabsl.c35 union IEEEl2bits u; in fabsl() local
37 u.e = x; in fabsl()
39 u.bits.signl ^= u.bits.sign; in fabsl()
41 u.bits.sign = 0; in fabsl()
42 return (u.e); in fabsl()
Ds_isinfl.c30 union IEEEl2bits u; in isinfl() local
32 u.e = e; in isinfl()
33 mask_nbit_l(u); in isinfl()
34 return (u.bits.exp == LDBL_INF_NAN_EXP && (u.bits.manl == 0 && u.bits.manh == 0)); in isinfl()
Ds_isnanl.c32 union IEEEl2bits u; in isnanl() local
34 u.e = e; in isnanl()
35 mask_nbit_l(u); in isnanl()
36 return (u.bits.exp == LDBL_INF_NAN_EXP && (u.bits.manl != 0 || u.bits.manh != 0)); in isnanl()
De_asinl.c32 union IEEEl2bits u; in asinl() local
35 u.e = x; in asinl()
36 expsign = u.xbits.expsign; in asinl()
39 if(expt==BIAS && ((u.bits.manh&~LDBL_NBIT)|u.bits.manl)==0) in asinl()
59 if(u.bits.manh>=THRESH) { /* if |x| is close to 1 */ in asinl()
63 u.e = s; in asinl()
64 u.bits.manl = 0; in asinl()
65 w = u.e; in asinl()
/picolibc-3.7.0-3.6.0/newlib/libm/ld/ld128/
De_atanhl.c42 ieee_quad_shape_type u; in atanhl() local
44 u.value = x; in atanhl()
45 jx = u.parts32.mswhi; in atanhl()
47 u.parts32.mswhi = ix; in atanhl()
50 if (u.value == one) in atanhl()
58 t = u.value+u.value; in atanhl()
59 t = 0.5L*log1pl(t+t*u.value/(one-u.value)); in atanhl()
61 t = 0.5L*log1pl((u.value+u.value)/(one-u.value)); in atanhl()
De_logl.c191 ieee_quad_shape_type u, t; in logl() local
195 u.value = x; in logl()
196 m = u.parts32.mswhi; in logl()
201 if ((k | u.parts32.mswlo | u.parts32.lswhi | u.parts32.lswlo) == 0) in logl()
223 m = (m << 1) | ((int32_t) u.parts32.mswlo < 0); in logl()
224 u.parts32.mswlo = (u.parts32.mswlo << 1) | ((int32_t) u.parts32.lswhi < 0); in logl()
225 u.parts32.lswhi = (u.parts32.lswhi << 1) | ((int32_t) u.parts32.lswlo < 0); in logl()
226 u.parts32.lswlo = (u.parts32.lswlo << 1); in logl()
232 u.parts32.mswhi = m | 0x3ffe0000; in logl()
244 u.parts32.mswhi += 0x10000; in logl()
[all …]
De_coshl.c57 ieee_quad_shape_type u; in coshl() local
59 u.value = x; in coshl()
60 ex = u.parts32.mswhi & 0x7fffffff; in coshl()
63 u.parts32.mswhi = ex; in coshl()
74 t = expm1l (u.value); in coshl()
83 t = expl (u.value); in coshl()
89 return half * expl (u.value); in coshl()
92 if (u.value <= ovf_thresh) in coshl()
94 w = expl (half * u.value); in coshl()
De_sinhl.c58 ieee_quad_shape_type u; in sinhl() local
61 u.value = x; in sinhl()
62 jx = u.parts32.mswhi; in sinhl()
74 u.parts32.mswhi = ix; in sinhl()
82 t = expm1l (u.value); in sinhl()
90 return h * expl (u.value); in sinhl()
94 if (u.value <= ovf_thresh) in sinhl()
96 w = expl (0.5L * u.value); in sinhl()
Ds_asinhl.c36 ieee_quad_shape_type u; in asinhl() local
38 u.value = x; in asinhl()
39 sign = u.parts32.mswhi; in asinhl()
48 u.parts32.mswhi = ix; in asinhl()
51 w = logl (u.value) + ln2; in asinhl()
55 t = u.value; in asinhl()
61 w = log1pl (u.value + t / (one + sqrtl (one + t))); in asinhl()
Ds_tanhl.c62 ieee_quad_shape_type u; in tanhl() local
65 u.value = x; in tanhl()
66 jx = u.parts32.mswhi; in tanhl()
81 if (u.value == 0) in tanhl()
85 u.parts32.mswhi = ix; /* Absolute value of x. */ in tanhl()
88 t = expm1l (two * u.value); in tanhl()
93 t = expm1l (-two * u.value); in tanhl()
/picolibc-3.7.0-3.6.0/newlib/libc/machine/w65/
Dcmpsi.c18 union u { union
30 union u u; in __cmpsi2() local
31 u.l = arga; in __cmpsi2()
33 if (u.w.msw != msw_b) in __cmpsi2()
35 if (u.w.msw < msw_b) return 0; in __cmpsi2()
38 if (u.w.lsw != lsw_b) in __cmpsi2()
40 if (u.w.lsw < lsw_b) return 0; in __cmpsi2()
/picolibc-3.7.0-3.6.0/newlib/libc/include/sys/
Dendian.h150 be16enc(void *pp, uint16_t u) in be16enc() argument
154 p[0] = (u >> 8) & 0xff; in be16enc()
155 p[1] = u & 0xff; in be16enc()
159 be32enc(void *pp, uint32_t u) in be32enc() argument
163 p[0] = (u >> 24) & 0xff; in be32enc()
164 p[1] = (u >> 16) & 0xff; in be32enc()
165 p[2] = (u >> 8) & 0xff; in be32enc()
166 p[3] = u & 0xff; in be32enc()
170 be64enc(void *pp, uint64_t u) in be64enc() argument
174 be32enc(p, (uint32_t)(u >> 32)); in be64enc()
[all …]
/picolibc-3.7.0-3.6.0/newlib/libc/machine/h8500/
Dcmpsi.c18 union u union
42 union u u; in __cmpsi2() local
43 u.l = arga; in __cmpsi2()
45 if (u.w.msw != msw_b) in __cmpsi2()
47 if (u.w.msw < msw_b) return 0; in __cmpsi2()
50 if (u.w.lsw != lsw_b) in __cmpsi2()
52 if (u.w.lsw < lsw_b) return 0; in __cmpsi2()
63 union us u; in __ucmpsi2() local
64 u.l = arga; in __ucmpsi2()
66 if (u.w.msw != msw_b) in __ucmpsi2()
[all …]
/picolibc-3.7.0-3.6.0/newlib/libm/ld/ldd/
Ds_nearbyintl.c39 union IEEEl2bits u; in nearbyintl() local
42 u.e = x; in nearbyintl()
43 if (u.bits.exp == LDBL_INF_NAN_EXP) in nearbyintl()
45 dh = nearbyint(u.dbits.dh); in nearbyintl()
46 frac = u.dbits.dh - dh; in nearbyintl()
49 if (u.dbits.dl > 0 && frac == 0.5) in nearbyintl()
51 else if(u.dbits.dl < 0 && frac == -0.5) in nearbyintl()
55 dl = nearbyint(u.dbits.dl); in nearbyintl()
Ds_truncl.c39 union IEEEl2bits u; in truncl() local
42 u.e = x; in truncl()
43 if (u.bits.exp == LDBL_INF_NAN_EXP) in truncl()
45 dh = trunc(u.dbits.dh); in truncl()
46 if (dh != u.dbits.dh) in truncl()
49 dl = dh > 0 ? floor(u.dbits.dl) : ceil(u.dbits.dl); in truncl()
Ds_ceill.c39 union IEEEl2bits u; in ceill() local
42 u.e = x; in ceill()
43 if (u.bits.exp == LDBL_INF_NAN_EXP) in ceill()
45 dh = ceil(u.dbits.dh); in ceill()
46 if (dh != u.dbits.dh) in ceill()
49 dl = ceil(u.dbits.dl); in ceill()
Ds_floorl.c39 union IEEEl2bits u; in floorl() local
42 u.e = x; in floorl()
43 if (u.bits.exp == LDBL_INF_NAN_EXP) in floorl()
45 dh = floor(u.dbits.dh); in floorl()
46 if (dh != u.dbits.dh) in floorl()
49 dl = floor(u.dbits.dl); in floorl()
/picolibc-3.7.0-3.6.0/newlib/libm/common/
Dsf_log1p.c36 float hfsq,f,c=0,s,z,R,u; in log1pf() local
63 u = (float)1.0+x; in log1pf()
64 GET_FLOAT_WORD(hu,u); in log1pf()
67 c = (k>0)? (float)1.0-(u-x):x-(u-(float)1.0); in log1pf()
68 c /= u; in log1pf()
70 u = x; in log1pf()
71 GET_FLOAT_WORD(hu,u); in log1pf()
77 SET_FLOAT_WORD(u,hu|0x3f800000);/* normalize u */ in log1pf()
80 SET_FLOAT_WORD(u,hu|0x3f000000); /* normalize u/2 */ in log1pf()
83 f = u-(float)1.0; in log1pf()

1234