Home
last modified time | relevance | path

Searched refs:bits (Results 1 – 25 of 58) sorted by relevance

123

/bionic/libm/upstream-freebsd/lib/msun/src/
Ds_nextafterl.c42 if ((ux.bits.exp == 0x7fff && in nextafterl()
43 ((ux.bits.manh&~LDBL_NBIT)|ux.bits.manl) != 0) || in nextafterl()
44 (uy.bits.exp == 0x7fff && in nextafterl()
45 ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl) != 0)) in nextafterl()
49 ux.bits.manh = 0; /* return +-minsubnormal */ in nextafterl()
50 ux.bits.manl = 1; in nextafterl()
51 ux.bits.sign = uy.bits.sign; in nextafterl()
56 if(ux.bits.manl==0) { in nextafterl()
57 if ((ux.bits.manh&~LDBL_NBIT)==0) in nextafterl()
58 ux.bits.exp -= 1; in nextafterl()
[all …]
Ds_ceill.c35 uint64_t o = u.bits.manh; \
36 u.bits.manh += (c); \
37 if (u.bits.manh < o) \
38 u.bits.exp++; \
43 uint64_t o = u.bits.manh; \
44 u.bits.manh += (c); \
45 if (u.bits.manh < o) { \
46 u.bits.exp++; \
47 u.bits.manh |= 1llu << (LDBL_MANH_SIZE - 1); \
58 int e = u.bits.exp - LDBL_MAX_EXP + 1; in ceill()
[all …]
Ds_floorl.c35 uint64_t o = u.bits.manh; \
36 u.bits.manh += (c); \
37 if (u.bits.manh < o) \
38 u.bits.exp++; \
43 uint64_t o = u.bits.manh; \
44 u.bits.manh += (c); \
45 if (u.bits.manh < o) { \
46 u.bits.exp++; \
47 u.bits.manh |= 1llu << (LDBL_MANH_SIZE - 1); \
58 int e = u.bits.exp - LDBL_MAX_EXP + 1; in floorl()
[all …]
De_fmodl.c75 sx = ux.bits.sign; in fmodl()
78 if((uy.bits.exp|uy.bits.manh|uy.bits.manl)==0 || /* y=0 */ in fmodl()
79 (ux.bits.exp == BIAS + LDBL_MAX_EXP) || /* or x not finite */ in fmodl()
80 (uy.bits.exp == BIAS + LDBL_MAX_EXP && in fmodl()
81 ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl)!=0)) /* or y is NaN */ in fmodl()
83 if(ux.bits.exp<=uy.bits.exp) { in fmodl()
84 if((ux.bits.exp<uy.bits.exp) || in fmodl()
85 (ux.bits.manh<=uy.bits.manh && in fmodl()
86 (ux.bits.manh<uy.bits.manh || in fmodl()
87 ux.bits.manl<uy.bits.manl))) { in fmodl()
[all …]
Ds_remquol.c78 sx = ux.bits.sign; in remquol()
79 sxy = sx ^ uy.bits.sign; in remquol()
80 ux.bits.sign = 0; /* |x| */ in remquol()
81 uy.bits.sign = 0; /* |y| */ in remquol()
85 if((uy.bits.exp|uy.bits.manh|uy.bits.manl)==0 || /* y=0 */ in remquol()
86 (ux.bits.exp == BIAS + LDBL_MAX_EXP) || /* or x not finite */ in remquol()
87 (uy.bits.exp == BIAS + LDBL_MAX_EXP && in remquol()
88 ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl)!=0)) /* or y is NaN */ in remquol()
90 if(ux.bits.exp<=uy.bits.exp) { in remquol()
91 if((ux.bits.exp<uy.bits.exp) || in remquol()
[all …]
Ds_modfl.c51 #define GETFRAC(bits, n) ((bits) & ~(MASK << (n))) argument
64 e = ux.bits.exp - LDBL_MAX_EXP + 1; in modfl()
67 *iptr = zero[ux.bits.sign]; in modfl()
70 if ((GETFRAC(ux.bits.manh, HIBITS - 1 - e) | in modfl()
71 ux.bits.manl) == 0) { /* X is an integer. */ in modfl()
73 return (zero[ux.bits.sign]); in modfl()
76 ux.bits.manh >>= HIBITS - 1 - e; in modfl()
77 ux.bits.manh <<= HIBITS - 1 - e; in modfl()
78 ux.bits.manl = 0; in modfl()
87 return (zero[ux.bits.sign]); in modfl()
[all …]
De_sqrtl.c43 if (++u.bits.manl == 0) { in inc()
44 if (++u.bits.manh == 0) { in inc()
45 u.bits.exp++; in inc()
46 u.bits.manh |= LDBL_NBIT; in inc()
59 if (u.bits.manl-- == 0) { in dec()
60 if (u.bits.manh-- == LDBL_NBIT) { in dec()
61 u.bits.exp--; in dec()
62 u.bits.manh |= LDBL_NBIT; in dec()
88 if (u.bits.exp == LDBL_MAX_EXP * 2 - 1) in sqrtl()
92 if ((u.bits.manh | u.bits.manl | u.bits.exp) == 0) in sqrtl()
[all …]
Ds_fmin.c43 if (u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0) in fmin()
45 if (u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0) in fmin()
49 if (u[0].bits.sign != u[1].bits.sign) in fmin()
50 return (u[u[1].bits.sign].d); in fmin()
Ds_fmax.c43 if (u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0) in fmax()
45 if (u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0) in fmax()
49 if (u[0].bits.sign != u[1].bits.sign) in fmax()
50 return (u[u[0].bits.sign].d); in fmax()
Ds_ilogbl.c30 if (u.bits.exp == 0) { in ilogbl()
31 if ((u.bits.manl | u.bits.manh) == 0) in ilogbl()
34 if (u.bits.manh == 0) { in ilogbl()
36 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_fminl.c45 if (u[0].bits.exp == 32767 && (u[0].bits.manh | u[0].bits.manl) != 0) in fminl()
47 if (u[1].bits.exp == 32767 && (u[1].bits.manh | u[1].bits.manl) != 0) in fminl()
51 if (u[0].bits.sign != u[1].bits.sign) in fminl()
52 return (u[1].bits.sign ? y : x); in fminl()
Ds_fmaxl.c45 if (u[0].bits.exp == 32767 && (u[0].bits.manh | u[0].bits.manl) != 0) in fmaxl()
47 if (u[1].bits.exp == 32767 && (u[1].bits.manh | u[1].bits.manl) != 0) in fmaxl()
51 if (u[0].bits.sign != u[1].bits.sign) in fmaxl()
52 return (u[0].bits.sign ? y : x); in fmaxl()
Ds_logbl.c31 if (u.bits.exp == 0) { in logbl()
32 if ((u.bits.manl | u.bits.manh) == 0) { /* x == 0 */ in logbl()
33 u.bits.sign = 1; in logbl()
37 if (u.bits.manh == 0) { in logbl()
39 for (b = LDBL_MANH_SIZE; !(u.bits.manl & m); m >>= 1) in logbl()
43 for (b = 0; !(u.bits.manh & m); m >>= 1) in logbl()
51 if (u.bits.exp < (LDBL_MAX_EXP << 1) - 1) /* normal */ in logbl()
52 return ((long double)(u.bits.exp - LDBL_MAX_EXP + 1)); in logbl()
Ds_frexpl.c44 switch (u.bits.exp) { in frexpl()
46 if ((u.bits.manl | u.bits.manh) == 0) { in frexpl()
50 *ex = u.bits.exp - 0x4200; in frexpl()
51 u.bits.exp = 0x3ffe; in frexpl()
57 *ex = u.bits.exp - 0x3ffe; in frexpl()
58 u.bits.exp = 0x3ffe; in frexpl()
Ds_fmaxf.c43 if (u[0].bits.exp == 255 && u[0].bits.man != 0) in fmaxf()
45 if (u[1].bits.exp == 255 && u[1].bits.man != 0) in fmaxf()
49 if (u[0].bits.sign != u[1].bits.sign) in fmaxf()
50 return (u[u[0].bits.sign].f); in fmaxf()
Ds_fminf.c43 if (u[0].bits.exp == 255 && u[0].bits.man != 0) in fminf()
45 if (u[1].bits.exp == 255 && u[1].bits.man != 0) in fminf()
49 if (u[0].bits.sign != u[1].bits.sign) in fminf()
50 return (u[u[1].bits.sign].f); in fminf()
Ds_truncl.c45 int e = u.bits.exp - LDBL_MAX_EXP + 1; in truncl()
50 u.e = zero[u.bits.sign]; in truncl()
53 if (((u.bits.manh & m) | u.bits.manl) == 0) in truncl()
56 u.bits.manh &= ~m; in truncl()
57 u.bits.manl = 0; in truncl()
62 if ((u.bits.manl & m) == 0) in truncl()
65 u.bits.manl &= ~m; in truncl()
Ds_nan.c83 uint32_t bits[2]; member
86 _scan_nan(u.bits, 2, s);
88 u.bits[1] |= 0x7ff80000;
90 u.bits[0] |= 0x7ff80000;
100 uint32_t bits[1]; member
103 _scan_nan(u.bits, 1, s);
104 u.bits[0] |= 0x7fc00000;
De_atan2l.c62 ((ux.bits.manh&~LDBL_NBIT)|ux.bits.manl)!=0) || /* x is NaN */ in atan2l()
64 ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl)!=0)) /* y is NaN */ in atan2l()
66 if (expsignx==BIAS && ((ux.bits.manh&~LDBL_NBIT)|ux.bits.manl)==0) in atan2l()
71 if(expty==0 && ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl)==0) { in atan2l()
80 if(exptx==0 && ((ux.bits.manh&~LDBL_NBIT)|ux.bits.manl)==0) in atan2l()
Ds_scalbnl.c50 k = u.bits.exp; /* extract exponent */ in scalbnl()
52 if ((u.bits.manh|u.bits.manl)==0) return x; /* +-0 */ in scalbnl()
54 k = u.bits.exp - 128; in scalbnl()
61 {u.bits.exp = k; return u.e;} in scalbnl()
67 u.bits.exp = k; in scalbnl()
/bionic/libc/upstream-openbsd/lib/libc/gdtoa/
DstrtorQ.c54 ULtoQ(L, bits, exp, k) ULong *L; ULong *bits; Long exp; int k; in ULtoQ() argument
56 ULtoQ(ULong *L, ULong *bits, Long exp, int k)
67 L[_3] = bits[0];
68 L[_2] = bits[1];
69 L[_1] = bits[2];
70 L[_0] = (bits[3] & ~0x10000) | ((exp + 0x3fff + 112) << 16);
74 L[_3] = bits[0];
75 L[_2] = bits[1];
76 L[_1] = bits[2];
77 L[_0] = bits[3];
[all …]
Dstrtord.c36 ULtod(L, bits, exp, k) ULong *L; ULong *bits; Long exp; int k; in ULtod() argument
38 ULtod(ULong *L, ULong *bits, Long exp, int k)
48 L[_1] = bits[0];
49 L[_0] = bits[1];
54 L[_1] = bits[0];
55 L[_0] = (bits[1] & ~0x100000) | ((exp + 0x3ff + 52) << 20);
83 ULong bits[2]; local
93 k = strtodg(s, sp, fpi, &exp, bits);
94 ULtod((ULong*)d, bits, exp, k);
/bionic/libm/
Dfpmath.h47 } bits; member
60 } bits; member
72 } bits; member
88 (a)[0] = (uint32_t)(u).bits.manl; \
89 (a)[1] = (uint32_t)((u).bits.manl >> 32); \
90 (a)[2] = (uint32_t)(u).bits.manh; \
91 (a)[3] = (uint32_t)((u).bits.manh >> 32); \
/bionic/libc/bionic/
Dfpclassify.cpp40 ieee_single bits; member
45 ieee_double bits; member
51 if (u.bits.dbl_exp == 0) { in __fpclassifyd()
52 return ((u.bits.dbl_fracl | u.bits.dbl_frach) == 0) ? FP_ZERO : FP_SUBNORMAL; in __fpclassifyd()
54 if (u.bits.dbl_exp == DBL_EXP_INFNAN) { in __fpclassifyd()
55 return ((u.bits.dbl_fracl | u.bits.dbl_frach) == 0) ? FP_INFINITE : FP_NAN; in __fpclassifyd()
64 if (u.bits.sng_exp == 0) { in __fpclassifyf()
65 return (u.bits.sng_frac == 0) ? FP_ZERO : FP_SUBNORMAL; in __fpclassifyf()
67 if (u.bits.sng_exp == SNG_EXP_INFNAN) { in __fpclassifyf()
68 return (u.bits.sng_frac == 0) ? FP_INFINITE : FP_NAN; in __fpclassifyf()
[all …]
/bionic/libm/upstream-freebsd/lib/msun/ld128/
Ds_nanl.c39 uint32_t bits[4]; in nanl() member
42 _scan_nan(u.bits, 4, s); in nanl()
43 u.ieee.bits.exp = 0x7fff; in nanl()
44 u.ieee.bits.manh |= 1ULL << 47; /* make it a quiet NaN */ in nanl()

123