Home
last modified time | relevance | path

Searched refs:bits (Results 1 – 25 of 61) 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 …]
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()
84 if((uy.bits.exp|uy.bits.manh|uy.bits.manl)==0 || /* y=0 */ in remquol()
85 (ux.bits.exp == BIAS + LDBL_MAX_EXP) || /* or x not finite */ in remquol()
86 (uy.bits.exp == BIAS + LDBL_MAX_EXP && in remquol()
87 ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl)!=0)) /* or y is NaN */ in remquol()
89 if(ux.bits.exp<=uy.bits.exp) { in remquol()
90 if((ux.bits.exp<uy.bits.exp) || in remquol()
[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 …]
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 …]
De_sqrtl.c45 if (++u.bits.manl == 0) { in inc()
46 if (++u.bits.manh == 0) { in inc()
47 u.bits.exp++; in inc()
48 u.bits.manh |= LDBL_NBIT; in inc()
61 if (u.bits.manl-- == 0) { in dec()
62 if (u.bits.manh-- == LDBL_NBIT) { in dec()
63 u.bits.exp--; in dec()
64 u.bits.manh |= LDBL_NBIT; in dec()
90 if (u.bits.exp == LDBL_MAX_EXP * 2 - 1) in sqrtl()
94 if ((u.bits.manh | u.bits.manl | u.bits.exp) == 0) in sqrtl()
[all …]
Ds_modfl.c53 #define GETFRAC(bits, n) ((bits) & ~(MASK << (n))) argument
66 e = ux.bits.exp - LDBL_MAX_EXP + 1; in modfl()
69 *iptr = zero[ux.bits.sign]; in modfl()
72 if ((GETFRAC(ux.bits.manh, HIBITS - 1 - e) | in modfl()
73 ux.bits.manl) == 0) { /* X is an integer. */ in modfl()
75 return (zero[ux.bits.sign]); in modfl()
78 ux.bits.manh >>= HIBITS - 1 - e; in modfl()
79 ux.bits.manh <<= HIBITS - 1 - e; in modfl()
80 ux.bits.manl = 0; in modfl()
89 return (zero[ux.bits.sign]); in modfl()
[all …]
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_fmax.c46 if (u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0) in fmax()
48 if (u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0) in fmax()
52 if (u[0].bits.sign != u[1].bits.sign) in fmax()
53 return (u[u[0].bits.sign].d); in fmax()
Ds_fmin.c46 if (u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0) in fmin()
48 if (u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0) in fmin()
52 if (u[0].bits.sign != u[1].bits.sign) in fmin()
53 return (u[u[1].bits.sign].d); in fmin()
Ds_fminl.c47 if (u[0].bits.exp == 32767 && (u[0].bits.manh | u[0].bits.manl) != 0) in fminl()
49 if (u[1].bits.exp == 32767 && (u[1].bits.manh | u[1].bits.manl) != 0) in fminl()
53 if (u[0].bits.sign != u[1].bits.sign) in fminl()
54 return (u[1].bits.sign ? y : x); in fminl()
Ds_fmaxl.c47 if (u[0].bits.exp == 32767 && (u[0].bits.manh | u[0].bits.manl) != 0) in fmaxl()
49 if (u[1].bits.exp == 32767 && (u[1].bits.manh | u[1].bits.manl) != 0) in fmaxl()
53 if (u[0].bits.sign != u[1].bits.sign) in fmaxl()
54 return (u[0].bits.sign ? y : x); in fmaxl()
Ds_logbl.c30 if (u.bits.exp == 0) { in logbl()
31 if ((u.bits.manl | u.bits.manh) == 0) { /* x == 0 */ in logbl()
32 u.bits.sign = 1; in logbl()
36 if (u.bits.manh == 0) { in logbl()
38 for (b = LDBL_MANH_SIZE; !(u.bits.manl & m); m >>= 1) in logbl()
42 for (b = 0; !(u.bits.manh & m); m >>= 1) in logbl()
50 if (u.bits.exp < (LDBL_MAX_EXP << 1) - 1) /* normal */ in logbl()
51 return ((long double)(u.bits.exp - LDBL_MAX_EXP + 1)); in logbl()
Ds_frexpl.c46 switch (u.bits.exp) { in frexpl()
48 if ((u.bits.manl | u.bits.manh) == 0) { in frexpl()
52 *ex = u.bits.exp - 0x4200; in frexpl()
53 u.bits.exp = 0x3ffe; in frexpl()
59 *ex = u.bits.exp - 0x3ffe; in frexpl()
60 u.bits.exp = 0x3ffe; in frexpl()
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_fminf.c45 if (u[0].bits.exp == 255 && u[0].bits.man != 0) in fminf()
47 if (u[1].bits.exp == 255 && u[1].bits.man != 0) in fminf()
51 if (u[0].bits.sign != u[1].bits.sign) in fminf()
52 return (u[u[1].bits.sign].f); in fminf()
Ds_fmaxf.c45 if (u[0].bits.exp == 255 && u[0].bits.man != 0) in fmaxf()
47 if (u[1].bits.exp == 255 && u[1].bits.man != 0) in fmaxf()
51 if (u[0].bits.sign != u[1].bits.sign) in fmaxf()
52 return (u[u[0].bits.sign].f); in fmaxf()
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_nan.c85 uint32_t bits[2]; member
88 _scan_nan(u.bits, 2, s);
90 u.bits[1] |= 0x7ff80000;
92 u.bits[0] |= 0x7ff80000;
102 uint32_t bits[1]; member
105 _scan_nan(u.bits, 1, s);
106 u.bits[0] |= 0x7fc00000;
Ds_scalbnl.c48 k = u.bits.exp; /* extract exponent */ in scalbnl()
50 if ((u.bits.manh|u.bits.manl)==0) return x; /* +-0 */ in scalbnl()
52 k = u.bits.exp - 128; in scalbnl()
59 {u.bits.exp = k; return u.e;} in scalbnl()
67 u.bits.exp = k; in scalbnl()
Ds_tanl.c62 s = z.bits.sign; in tanl()
63 z.bits.sign = 0; in tanl()
66 if (z.bits.exp == 0) in tanl()
70 if (z.bits.exp == 32767) in tanl()
/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.h46 } bits; member
59 } bits; member
71 } bits; member
87 (a)[0] = (uint32_t)(u).bits.manl; \
88 (a)[1] = (uint32_t)((u).bits.manl >> 32); \
89 (a)[2] = (uint32_t)(u).bits.manh; \
90 (a)[3] = (uint32_t)((u).bits.manh >> 32); \
/bionic/libm/upstream-freebsd/lib/msun/ld128/
Ds_nanl.c41 uint32_t bits[4]; in nanl() member
44 _scan_nan(u.bits, 4, s); in nanl()
45 u.ieee.bits.exp = 0x7fff; in nanl()
46 u.ieee.bits.manh |= 1ULL << 47; /* make it a quiet NaN */ in nanl()

123