Lines Matching refs:bits

159 /*    is not useful for longer numbers because overflow of 32 bits    */
300 /* masked special-values bits */
301 #define SPECIALARG (rhs->bits & DECSPECIAL)
302 #define SPECIALARGS ((lhs->bits | rhs->bits) & DECSPECIAL)
373 if (in<0) dn->bits=DECNEG; /* sign needed */
405 if (dn->bits&DECSPECIAL || dn->digits>10 || dn->exponent!=0) ; /* bad */
422 if (dn->bits&DECNEG && hi==214748364 && lo==8) return 0x80000000;
427 if (dn->bits&DECNEG) return -i;
440 if (dn->bits&DECSPECIAL || dn->digits>10 || dn->exponent!=0
441 || (dn->bits&DECNEG && !ISZERO(dn))); /* bad */
511 uByte bits=0; /* working flags [assume +ve] */
547 bits=DECNEG;
569 dn->bits=bits | DECINF;
575 dn->bits=bits | DECNAN; /* assume simple NaN */
578 dn->bits=bits | DECSNAN;
607 bits=dn->bits; /* for copy-back */
711 dn->bits=bits;
768 decAddOp(res, &dzero, rhs, set, (uByte)(rhs->bits & DECNEG), &status);
846 if (a|b) { /* maybe 1 bits to examine */
867 res->bits=0; /* sign=0 */
972 a->bits&=~DECNEG; /* .. and clear the sign */
986 b->bits&=~DECNEG; /* .. and clear the sign */
1176 res->bits=DECNAN;
1238 /* always need to examine all bits in rhs */
1254 res->bits=0; /* sign=0 */
1365 res->bits=DECNEG|DECINF; /* -Infinity */
1460 if (!(rhs->bits&(DECNEG|DECSPECIAL)) && !ISZERO(rhs)) {
1506 if (a->bits&DECSPECIAL || ISZERO(a)) {
1697 if ((rhs->bits&(DECINF|DECNEG))==DECINF) {
1733 if ((rhs->bits&(DECINF|DECNEG))==(DECINF|DECNEG)) {
1735 res->bits=DECNEG; /* negative */
1785 if ((lhs->bits&(DECINF|DECNEG))==(DECINF|DECNEG)) {
1787 res->bits=DECNEG; /* negative */
1795 if ((lhs->bits&(DECINF|DECNEG))==DECINF) {
1861 if (a|b) { /* maybe 1 bits to examine */
1881 res->bits=0; /* sign=0 */
1989 uByte bits=0; /* result sign if errors */
2025 Flag rhsneg=rhs->bits&DECNEG; /* save rhs sign */
2035 if (rhsneg) res->bits|=DECINF; /* +Infinity [else is +0] */
2046 if (!rhsneg) res->bits|=DECINF; /* +Infinity [else is +0] */
2063 && isoddint) bits=DECNEG; /* .. to an odd power */
2067 uByte rbits=rhs->bits; /* save */
2075 if (!(rbits & DECNEG)) bits|=DECINF; /* was not a **-n */
2077 res->bits=bits;
2093 uByte rbits=rhs->bits; /* save */
2100 bits|=DECINF;
2104 res->bits=bits;
2241 } /*i*/ /* 32 bits */
2257 dac->bits=(dac->bits & ~DECNEG) | bits; /* force correct sign */
2950 /* [Until further notice, no error is possible and status bits */
2955 t->bits=0; t->digits=3;
2956 a->bits=0; a->digits=3;
3291 if (a|b) { /* maybe 1 bits to examine */
3311 res->bits=0; /* sign=0 */
3391 dest->bits=src->bits;
3424 res->bits&=~DECNEG; /* turn off sign */
3445 res->bits^=DECNEG; /* invert the sign */
3467 sign=rhs->bits & DECNEG; /* save sign bit */
3469 res->bits&=~DECNEG; /* clear the sign */
3470 res->bits|=sign; /* set from rhs */
3621 dn->bits=0;
3667 if (dn->bits&DECSPECIAL) { /* Is a special value */
3673 if (dn->bits&DECSNAN) { /* signalling NaN */
3841 uByte bits; /* result bits */
3874 diffsign=(Flag)((lhs->bits^rhs->bits^negate)&DECNEG);
3887 bits=lhs->bits & DECNEG; /* get sign from LHS */
3889 else bits=(rhs->bits^negate) & DECNEG;/* RHS must be Infinity */
3890 bits|=DECINF;
3892 res->bits=bits; /* set +/- infinity */
3901 bits=lhs->bits; /* .. */
3904 res->bits^=negate; /* flip if rhs was negated */
3914 if (set->round!=DEC_ROUND_FLOOR) res->bits=0;
3915 else res->bits=DECNEG; /* preserve 0 sign */
3937 bits=rhs->bits; /* be clean */
4008 bits=lhs->bits; /* assume sign is that of LHS */
4020 bits=(uByte)(rhs->bits^negate); /* assumed sign is now that of RHS */
4042 if (!swapped) res->bits^=negate;
4079 res->bits=(uByte)(bits&DECNEG); /* it's now safe to overwrite.. */
4097 res->bits^=DECNEG; /* flip the sign */
4163 if (set->round==DEC_ROUND_FLOOR) res->bits|=DECNEG; /* sign - */
4164 else res->bits&=~DECNEG; /* sign + */
4281 uByte bits; /* working sign */
4312 bits=(lhs->bits^rhs->bits)&DECNEG; /* assumed sign for divisions */
4329 res->bits=bits|DECINF; /* set +/- infinity */
4340 res->bits=bits; /* set +/- zero */
4364 res->bits=bits|DECINF; /* .. is +/- Infinity */
4379 res->bits=bits; /* sign as computed */
4385 res->bits=bits; /* sign as computed */
4398 /* in 31 bits) and becomes the usual unadjusted exponent as the */
4412 res->bits=bits; /* set +/- zero */
4692 bits=lhs->bits; /* remainder sign is always as lhs */
4704 res->bits=(uByte)(bits&DECNEG); /* [cleaned] */
4799 bits^=DECNEG; /* flip the sign */
4805 /* Set exponent and bits */
4807 res->bits=(uByte)(bits&DECNEG); /* [cleaned] */
4872 uByte bits; /* result sign */
4932 bits=(uByte)((lhs->bits^rhs->bits)&DECNEG);
4940 if (((lhs->bits & DECINF)==0 && ISZERO(lhs))
4941 ||((rhs->bits & DECINF)==0 && ISZERO(rhs))) {
4945 res->bits=bits|DECINF; /* infinity */
5150 res->bits=bits; /* set sign */
5512 } /*i*/ /* 32 bits */
5537 /* top 14 bits encoding 0-9999) and a 2-digit encode of the */
5538 /* exponent (e=the bottom 2 bits encoding 0-3) */
5664 res->bits=DECINF|DECNEG; /* set - infinity */
5751 b->bits=DECNEG; /* ln(0.10)->ln(0.99) always -ve */
5787 a->bits^=DECNEG; /* make -a */
5789 a->bits^=DECNEG; /* restore sign of a */
5912 else if ((lhs->bits ^ rhs->bits) & DECINF)
5944 if (!set->extended) res->bits=0; /* subset specification; no -0 */
5979 if (ISZERO(res) && !set->extended) res->bits=0; /* subset; no -0 */
6090 merged=(lhs->bits | rhs->bits) & (DECSNAN | DECNAN);
6119 if (lhs->bits & DECNAN) result=-1; /* pick rhs */
6148 if (result<0) res->bits=DECNEG;
6158 uByte slhs=(lhs->bits & DECNEG);
6159 uByte srhs=(rhs->bits & DECNEG);
6234 if ((lhs->bits | rhs->bits) & DECINF) { /* one or more infinities */
6642 if ((dn->bits & DECSPECIAL) /* fast exit if special .. */
6885 dest->bits=src->bits;
6919 /* updated as necessary. dn->bits (sign) is unchanged. */
7285 dn->bits=0; /* .. and sign */
7321 /* adjusted exponent could overflow 31 bits [because it may already */
7391 uByte sign=dn->bits&DECNEG; /* clean and save sign bit */
7421 dn->bits=sign; /* set sign */
7423 else dn->bits=sign|DECINF; /* Value is +/-Infinity */
7448 dn->bits=0; /* + sign */
7736 if (lhs->bits & DECSNAN)
7739 else if (rhs->bits & DECSNAN) {
7743 else if (lhs->bits & DECNAN);
7752 res->bits=lhs->bits; /* need sign etc. */
7760 res->bits&=~DECSNAN; /* convert any sNaN to NaN, while */
7761 res->bits|=DECNAN; /* .. preserving sign */
7788 dn->bits=DECNAN; /* and make a quiet NaN */
7864 if (dn->bits&DECSPECIAL) { /* Is a special value */
7867 if (dn->bits&DECSNAN) printf("sNaN"); /* signalling NaN */
7983 res->bits=DECNAN; /* qNaN */
8011 if (dn->bits & DECSPECIAL) {
8015 (LI)dn->exponent, dn->bits);
8101 && (set->digits!=dn->digits) && !(dn->bits & DECSPECIAL)) {