Lines Matching refs:digits
389 dn->digits=decGetDigits(dn->lsu, static_cast<int32_t>(up - dn->lsu)); in uprv_decNumberFromUInt32()
409 if (dn->bits&DECSPECIAL || dn->digits>10 || dn->exponent!=0) ; /* bad */ in uprv_decNumberToInt32()
422 for (d=DECDPUN; d<dn->digits; up++, d+=DECDPUN) hi+=*up*powers[d-1]; in uprv_decNumberToInt32()
444 if (dn->bits&DECSPECIAL || dn->digits>10 || dn->exponent!=0 in uprv_decNumberToUInt32()
458 for (d=DECDPUN; d<dn->digits; up++, d+=DECDPUN) hi+=*up*powers[d-1]; in uprv_decNumberToUInt32()
603 if (d>set->digits-1) { in uprv_decNumberFromString()
607 if (d>set->digits) break; in uprv_decNumberFromString()
676 if (d<=set->digits) res=dn->lsu; /* fits into supplied decNumber */ in uprv_decNumberFromString()
719 dn->digits=d; in uprv_decNumberFromString()
722 if (d>set->digits) { in uprv_decNumberFromString()
730 if ((dn->exponent-1<set->emin-dn->digits) in uprv_decNumberFromString()
731 || (dn->exponent-1>set->emax-set->digits)) { in uprv_decNumberFromString()
841 msua=ua+D2U(lhs->digits)-1; /* -> msu of lhs */ in uprv_decNumberAnd()
842 msub=ub+D2U(rhs->digits)-1; /* -> msu of rhs */ in uprv_decNumberAnd()
843 msuc=uc+D2U(set->digits)-1; /* -> msu of result */ in uprv_decNumberAnd()
844 msudigs=MSUDIGITS(set->digits); /* [faster than remainder] */ in uprv_decNumberAnd()
871 res->digits=decGetDigits(res->lsu, static_cast<int32_t>(uc - res->lsu)); in uprv_decNumberAnd()
969 needbytes=sizeof(decNumber)+(D2U(lhs->digits)-1)*sizeof(Unit); in uprv_decNumberCompareTotalMag()
983 needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); in uprv_decNumberCompareTotalMag()
1091 if (rhs->digits>set->digits) { in uprv_decNumberExp()
1156 dcmul.digits=lhs->digits+rhs->digits; /* just enough */ in uprv_decNumberFMA()
1162 needbytes=sizeof(decNumber)+(D2U(dcmul.digits)-1)*sizeof(Unit); in uprv_decNumberFMA()
1235 msua=ua+D2U(rhs->digits)-1; /* -> msu of rhs */ in uprv_decNumberInvert()
1236 msuc=uc+D2U(set->digits)-1; /* -> msu of result */ in uprv_decNumberInvert()
1237 msudigs=MSUDIGITS(set->digits); /* [faster than remainder] */ in uprv_decNumberInvert()
1258 res->digits=decGetDigits(res->lsu, static_cast<int32_t>(uc - res->lsu)); in uprv_decNumberInvert()
1309 if (rhs->digits>set->digits) { in uprv_decNumberLn()
1375 Int ae=rhs->exponent+rhs->digits-1; /* adjusted exponent */ in uprv_decNumberLogB()
1451 if (rhs->digits>set->digits) { in uprv_decNumberLog10()
1471 aset.digits=1; in uprv_decNumberLog10()
1494 p=(rhs->digits+t>set->digits?rhs->digits+t:set->digits)+3; in uprv_decNumberLog10()
1503 aset.digits=p; /* as calculated */ in uprv_decNumberLog10()
1517 p=set->digits+3; in uprv_decNumberLog10()
1532 w->digits=2; /* .. */ in uprv_decNumberLog10()
1534 aset.digits=p; in uprv_decNumberLog10()
1537 aset.digits=set->digits; /* for final divide */ in uprv_decNumberLog10()
1856 msua=ua+D2U(lhs->digits)-1; /* -> msu of lhs */ in uprv_decNumberOr()
1857 msub=ub+D2U(rhs->digits)-1; /* -> msu of rhs */ in uprv_decNumberOr()
1858 msuc=uc+D2U(set->digits)-1; /* -> msu of result */ in uprv_decNumberOr()
1859 msudigs=MSUDIGITS(set->digits); /* [faster than remainder] */ in uprv_decNumberOr()
1885 res->digits=decGetDigits(res->lsu, static_cast<int32_t>(uc-res->lsu)); in uprv_decNumberOr()
1982 Int reqdigits=set->digits; /* requested DIGITS */ in uprv_decNumberPower()
2011 if (lhs->digits>reqdigits) { in uprv_decNumberPower()
2016 if (rhs->digits>reqdigits) { in uprv_decNumberPower()
2045 Int shift=set->digits-1; in uprv_decNumberPower()
2047 res->digits=decShiftToMost(res->lsu, 1, shift); in uprv_decNumberPower()
2140 aset.digits=MAXI(lhs->digits, set->digits)+6+4; in uprv_decNumberPower()
2155 aset.digits=reqdigits+(rhs->digits+rhs->exponent)+2; in uprv_decNumberPower()
2157 if (!set->extended) aset.digits--; /* use classic precision */ in uprv_decNumberPower()
2160 if (aset.digits>DECNUMMAXP) {status|=DEC_Invalid_operation; break;} in uprv_decNumberPower()
2165 needbytes=sizeof(decNumber)+(D2U(aset.digits)-1)*sizeof(Unit); in uprv_decNumberPower()
2186 Int shift=set->digits-1; in uprv_decNumberPower()
2187 dac->digits=decShiftToMost(dac->lsu, 1, shift); in uprv_decNumberPower()
2361 if (rhs->digits>set->digits) { in uprv_decNumberReduce()
2506 || abs(rotate)>set->digits) /* .. or out of range */ in uprv_decNumberRotate()
2511 if (rotate<0) rotate=set->digits+rotate; in uprv_decNumberRotate()
2512 if (rotate!=0 && rotate!=set->digits /* zero or full rotation */ in uprv_decNumberRotate()
2517 Unit *msu=res->lsu+D2U(res->digits)-1; /* current msu */ in uprv_decNumberRotate()
2518 Unit *msumax=res->lsu+D2U(set->digits)-1; /* rotation msu */ in uprv_decNumberRotate()
2520 res->digits=set->digits; /* now full-length */ in uprv_decNumberRotate()
2521 msudigits=MSUDIGITS(res->digits); /* actual digits in msu */ in uprv_decNumberRotate()
2554 rotate=set->digits-rotate; /* make it right-rotate */ in uprv_decNumberRotate()
2559 decShiftToLeast(res->lsu, D2U(res->digits), shift); in uprv_decNumberRotate()
2591 res->digits=decGetDigits(res->lsu, static_cast<int32_t>(msumax-res->lsu+1)); in uprv_decNumberRotate()
2664 || abs(reqexp)>(2*(set->digits+set->emax))) /* .. or out of range */ in uprv_decNumberScaleB()
2719 || abs(shift)>set->digits) /* .. or out of range */ in uprv_decNumberShift()
2725 if (shift==set->digits) { /* removing all */ in uprv_decNumberShift()
2727 res->digits=1; /* .. */ in uprv_decNumberShift()
2731 if (res->digits+shift>set->digits) { in uprv_decNumberShift()
2732 decDecap(res, res->digits+shift-set->digits); in uprv_decNumberShift()
2736 if (res->digits>1 || *res->lsu) /* if non-zero.. */ in uprv_decNumberShift()
2737 res->digits=decShiftToMost(res->lsu, res->digits, shift); in uprv_decNumberShift()
2741 if (-shift>=res->digits) { /* discarding all */ in uprv_decNumberShift()
2743 res->digits=1; /* .. */ in uprv_decNumberShift()
2746 decShiftToLeast(res->lsu, D2U(res->digits), -shift); in uprv_decNumberShift()
2747 res->digits-=(-shift); in uprv_decNumberShift()
2874 if (rhs->digits>set->digits) { in uprv_decNumberSquareRoot()
2922 workp=MAXI(set->digits+1, rhs->digits); /* actual rounding precision */ in uprv_decNumberSquareRoot()
2926 needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); in uprv_decNumberSquareRoot()
2948 exp=f->exponent+f->digits; /* adjusted to Hull rules */ in uprv_decNumberSquareRoot()
2949 f->exponent=-(f->digits); /* to range */ in uprv_decNumberSquareRoot()
2960 workset.digits=workp; /* p for initial calculation */ in uprv_decNumberSquareRoot()
2961 t->bits=0; t->digits=3; in uprv_decNumberSquareRoot()
2962 a->bits=0; a->digits=3; in uprv_decNumberSquareRoot()
3006 workset.digits=3; /* initial p */ in uprv_decNumberSquareRoot()
3007 for (; workset.digits<maxp;) { in uprv_decNumberSquareRoot()
3009 workset.digits=MINI(workset.digits*2-2, maxp); in uprv_decNumberSquareRoot()
3048 workset.digits--; /* maxp-1 is OK now */ in uprv_decNumberSquareRoot()
3049 t->exponent=-a->digits-1; /* make 0.5 ulp */ in uprv_decNumberSquareRoot()
3094 if (b->digits*2-1 > workp) { /* cannot fit */ in uprv_decNumberSquareRoot()
3113 Int maxexp=set->emax-set->digits+1; in uprv_decNumberSquareRoot()
3124 decShiftToLeast(a->lsu, D2U(a->digits), todrop); in uprv_decNumberSquareRoot()
3126 a->digits-=todrop; /* new length */ in uprv_decNumberSquareRoot()
3136 Int ae=rhs->exponent+rhs->digits-1; /* adjusted exponent */ in uprv_decNumberSquareRoot()
3231 workset.digits=rhs->digits; /* no length rounding */ in uprv_decNumberToIntegralExact()
3286 msua=ua+D2U(lhs->digits)-1; /* -> msu of lhs */ in uprv_decNumberXor()
3287 msub=ub+D2U(rhs->digits)-1; /* -> msu of rhs */ in uprv_decNumberXor()
3288 msuc=uc+D2U(set->digits)-1; /* -> msu of result */ in uprv_decNumberXor()
3289 msudigs=MSUDIGITS(set->digits); /* [faster than remainder] */ in uprv_decNumberXor()
3315 res->digits=decGetDigits(res->lsu, static_cast<int32_t>(uc-res->lsu)); in uprv_decNumberXor()
3399 dest->digits=src->digits; in uprv_decNumberCopy()
3401 if (src->digits>DECDPUN) { /* more Units to come */ in uprv_decNumberCopy()
3407 smsup=src->lsu+D2U(src->digits); /* -> source msu+1 */ in uprv_decNumberCopy()
3491 uByte *ub=bcd+dn->digits-1; /* -> lsd */ in uprv_decNumberGetBCD()
3525 Unit *up=dn->lsu+D2U(dn->digits)-1; /* -> msu [target pointer] */ in uprv_decNumberSetBCD()
3539 dn->digits=n; /* set digit count */ in uprv_decNumberSetBCD()
3558 ae=dn->exponent+dn->digits-1; /* adjusted exponent */ in uprv_decNumberIsNormal()
3578 ae=dn->exponent+dn->digits-1; /* adjusted exponent */ in uprv_decNumberIsSubnormal()
3629 dn->digits=1; in uprv_decNumberZero()
3660 const Unit *up=dn->lsu+D2U(dn->digits)-1; /* -> msu [input pointer] */ in decToString()
3687 if (exp!=0 || (*dn->lsu==0 && dn->digits==1)) return; in decToString()
3692 cut=MSUDIGITS(dn->digits); /* [faster than remainder] */ in decToString()
3705 pre=dn->digits+exp; /* digits before '.' */ in decToString()
3708 e=exp+dn->digits-1; /* calculate E value */ in decToString()
3748 if (n<dn->digits) { /* more to come, after '.' */ in decToString()
3854 Int reqdigits=set->digits; /* local copy; requested DIGITS */ in decAddOp()
3865 if (lhs->digits>reqdigits) { in decAddOp()
3870 if (rhs->digits>reqdigits) { in decAddOp()
3926 if ((res->digits-adjust)>set->digits) { in decAddOp()
3927 adjust=res->digits-set->digits; /* to fit exactly */ in decAddOp()
3930 res->digits=decShiftToMost(res->lsu, res->digits, -adjust); in decAddOp()
3953 if ((res->digits-adjust)>set->digits) { in decAddOp()
3954 adjust=res->digits-set->digits; /* to fit exactly */ in decAddOp()
3957 res->digits=decShiftToMost(res->lsu, res->digits, -adjust); in decAddOp()
3976 && rhs->digits<=DECDPUN in decAddOp()
3978 && rhs->exponent<=set->emax-set->digits+1 /* [could clamp] */ in decAddOp()
3979 && rhs->digits<=reqdigits in decAddOp()
3980 && lhs->digits<=reqdigits) { in decAddOp()
3985 && (lhs->digits>=DECDPUN || /* .. and no digits-count change */ in decAddOp()
3986 partial<(Int)powers[lhs->digits])) { /* .. */ in decAddOp()
3999 res->digits=decGetDigits(res->lsu, D2U(res->digits)); in decAddOp()
4034 if (rhs->digits+padding > lhs->digits+reqdigits+1) { in decAddOp()
4037 Int shift=reqdigits-rhs->digits; /* left shift needed */ in decAddOp()
4044 res->digits=decShiftToMost(res->lsu, res->digits, shift); in decAddOp()
4060 maxdigits=rhs->digits+padding; /* virtual length of RHS */ in decAddOp()
4061 if (lhs->digits>maxdigits) maxdigits=lhs->digits; in decAddOp()
4089 decDumpAr('A', lhs->lsu, D2U(lhs->digits)); in decAddOp()
4090 decDumpAr('B', rhs->lsu, D2U(rhs->digits)); in decAddOp()
4095 U_ASSERT(rhs->digits > 0); in decAddOp()
4096 U_ASSERT(lhs->digits > 0); in decAddOp()
4097 res->digits=decUnitAddSub(lhs->lsu, D2U(lhs->digits), in decAddOp()
4098 rhs->lsu, D2U(rhs->digits), in decAddOp()
4101 if (res->digits<0) { /* borrowed... */ in decAddOp()
4102 res->digits=-res->digits; in decAddOp()
4106 decDumpAr('+', acc, D2U(res->digits)); in decAddOp()
4119 if (res->digits>reqdigits) in decAddOp()
4120 res->digits=decGetDigits(acc, D2U(res->digits)); in decAddOp()
4121 decSetCoeff(res, set, acc, res->digits, &residue, status); in decAddOp()
4130 if (res->digits<maxdigits) { in decAddOp()
4131 *(acc+D2U(res->digits))=0; /* ensure leading 0 is there */ in decAddOp()
4132 res->digits=maxdigits; in decAddOp()
4138 if (res->digits>reqdigits) { in decAddOp()
4139 res->digits=decGetDigits(acc, D2U(res->digits)); in decAddOp()
4140 if (res->digits<maxdigits) res->digits=maxdigits; in decAddOp()
4143 decSetCoeff(res, set, acc, res->digits, &residue, status); in decAddOp()
4155 res->digits=decGetDigits(res->lsu, D2U(res->digits)); in decAddOp()
4284 Int reqdigits=set->digits; /* requested DIGITS */ in decDivideOp()
4304 if (lhs->digits>reqdigits) { in decDivideOp()
4309 if (rhs->digits>reqdigits) { in decDivideOp()
4350 res->exponent=set->emin-set->digits+1; in decDivideOp()
4407 exponent=(lhs->exponent+lhs->digits)-(rhs->exponent+rhs->digits); in decDivideOp()
4460 maxdigits=rhs->digits+reqdigits-1; in decDivideOp()
4461 if (lhs->digits>maxdigits) maxdigits=lhs->digits; in decDivideOp()
4481 source=lhs->lsu+D2U(lhs->digits)-1; /* msu of input array */ in decDivideOp()
4487 var2units=D2U(rhs->digits); /* rhs actual length (units) */ in decDivideOp()
4518 var1initpad=(var1units-D2U(lhs->digits))*DECDPUN; in decDivideOp()
4752 compare=decUnitCompare(accnext, tarunits, rhs->lsu, D2U(rhs->digits), in decDivideOp()
4800 rhs->lsu, D2U(rhs->digits), in decDivideOp()
4958 if (lhs->digits<rhs->digits) { /* swap... */ in decMultiplyOp()
4968 if (lhs->digits>set->digits) { in decMultiplyOp()
4973 if (rhs->digits>set->digits) { in decMultiplyOp()
4986 if (rhs->digits>NEEDTWO) { /* use fastpath... */ in decMultiplyOp()
4988 ilhs=(lhs->digits+FASTDIGS-1)/FASTDIGS; /* [ceiling] */ in decMultiplyOp()
4989 irhs=(rhs->digits+FASTDIGS-1)/FASTDIGS; /* .. */ in decMultiplyOp()
5031 for (count=lhs->digits, cup=lhs->lsu, lip=zlhi; count>0; lip++) in decMultiplyOp()
5036 for (count=rhs->digits, cup=rhs->lsu, rip=zrhi; count>0; rip++) in decMultiplyOp()
5113 needbytes=(D2U(lhs->digits)+D2U(rhs->digits))*sizeof(Unit); in decMultiplyOp()
5128 madlength=D2U(lhs->digits); /* this won't change */ in decMultiplyOp()
5129 mermsup=rhs->lsu+D2U(rhs->digits); /* -> msu+1 of multiplier */ in decMultiplyOp()
5157 res->digits=decGetDigits(acc, accunits); /* count digits exactly */ in decMultiplyOp()
5171 decSetCoeff(res, set, acc, res->digits, &residue, status); in decMultiplyOp()
5337 d->exponent=-set->digits; /* * 10**(-d) */ in decExpOp()
5344 Int shift=set->digits-1; in decExpOp()
5347 res->digits=decShiftToMost(res->lsu, 1, shift); in decExpOp()
5362 h=rhs->exponent+rhs->digits; in decExpOp()
5379 Int maxlever=(rhs->digits>8?1:0); in decExpOp()
5391 Int use=-rhs->digits-lever; /* exponent to use for RHS */ in decExpOp()
5400 needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); in decExpOp()
5424 p=MAXI(x->digits, set->digits)+h+2; /* [h<=8] */ in decExpOp()
5462 aset.digits=p*2; /* double */ in decExpOp()
5464 tset.digits=p; in decExpOp()
5482 if (((a->digits+a->exponent)>=(t->digits+t->exponent+p+1)) in decExpOp()
5483 && (a->digits>=p)) break; in decExpOp()
5491 (LI)iterations, (LI)*status, (LI)p, (LI)x->digits); in decExpOp()
5501 aset.digits=p+2; /* sufficient precision */ in decExpOp()
5526 aset.digits=set->digits; /* [use default rounding] */ in decExpOp()
5681 if (rhs->exponent==0 && set->digits<=40) {
5683 if (rhs->lsu[0]==0 && rhs->lsu[1]==1 && rhs->digits==2) { /* ln(10) */
5685 if (rhs->lsu[0]==10 && rhs->digits==2) { /* ln(10) */
5692 if (rhs->lsu[0]==2 && rhs->digits==1) { /* ln(2) */
5705 p=MAXI(rhs->digits, MAXI(set->digits, 7))+2;
5721 pp=p+rhs->digits;
5741 r=rhs->exponent+rhs->digits; /* 'normalised' exponent */
5749 aset.digits=2; aset.round=DEC_ROUND_DOWN;
5758 aset.digits=16; aset.round=DEC_ROUND_HALF_EVEN; /* restore */
5781 aset.digits=pp; /* working context */
5782 bset.digits=pp+rhs->digits; /* wider context */
5809 (a->digits+a->exponent)>=(b->digits+b->exponent+set->digits+1)) {
5810 if (a->digits==p) break;
5827 aset.digits=pp; /* working context */
5828 bset.digits=pp+rhs->digits; /* wider context */
5835 (LI)iterations, (LI)*status, (LI)p, (LI)rhs->digits);
5841 aset.digits=set->digits; /* [use default rounding] */
5885 Int reqdigits=set->digits; /* requested DIGITS */
5898 if (lhs->digits>reqdigits) {
5903 if (rhs->digits>reqdigits) { /* [this only checks lostDigits] */
5956 if ((lhs->digits-adjust)>reqdigits) {
5966 workset.digits=lhs->digits-adjust; /* set requested length */
5976 if (res->digits==reqdigits) { /* cannot shift by 1 */
5981 res->digits=decShiftToMost(res->lsu, res->digits, 1); /* shift */
5995 res->digits=decShiftToMost(res->lsu, res->digits, -adjust);
6003 if (res->exponent>set->emax-res->digits+1) { /* too big */
6068 if (lhs->digits>set->digits) {
6073 if (rhs->digits>set->digits) {
6111 result=decUnitCompare(lhs->lsu, D2U(lhs->digits),
6112 rhs->lsu, D2U(rhs->digits), 0);
6255 compare=decUnitCompare(lhs->lsu, D2U(lhs->digits),
6256 rhs->lsu, D2U(rhs->digits),
6659 for (d=0; d<dn->digits-1; d++) { /* [don't strip the final digit] */
6685 Int maxd=set->emax-set->digits+1-dn->exponent;
6691 decShiftToLeast(dn->lsu, D2U(dn->digits), d);
6693 dn->digits-=d; /* new length */
6731 static Int decShiftToMost(Unit *uar, Int digits, Int shift) { argument
6736 if (shift==0) return digits; /* [fastpath] nothing to do */
6737 if ((digits+shift)<=DECDPUN) { /* [fastpath] single-unit case */
6739 return digits+shift;
6743 source=uar+D2U(digits)-1; /* where msu comes from */
6750 first=uar+D2U(digits+shift)-1; /* where msu of source will end up */
6771 return digits+shift;
6862 +(D2U(set->digits)-1)*sizeof(Unit));
6893 decSetCoeff(dest, set, src->lsu, src->digits, residue, status);
6946 discard=len-set->digits; /* digits to discard */
6954 dn->digits=len; /* set the new length */
6978 dn->digits=1; /* .. */
7007 if (set->digits<=0) { /* special for Quantize/Subnormal :-( */
7009 dn->digits=1; /* .. */
7012 count=set->digits; /* now digits to end up with */
7013 dn->digits=count; /* set the new length */
7053 if (set->digits<=0) { /* special for Quantize/Subnormal :-( */
7055 dn->digits=1; /* .. */
7058 count=set->digits; /* now digits to end up with */
7059 dn->digits=count; /* set the new length */
7205 uInt count=dn->digits; /* digits to be checked */
7215 if ((dn->exponent+dn->digits)>set->emax+1) {
7229 uInt count=dn->digits; /* digits to be checked */
7246 if (dn->exponent+1==set->emin-set->digits+1) {
7247 if (count==1 && dn->digits==1) *sup=0; /* here 9 -> 0[.9] */
7250 dn->digits--;
7266 decUnitAddSub(dn->lsu, D2U(dn->digits), uarrone, 1, 0, dn->lsu, bump);
7296 if (set->digits >= (dn->exponent+dn->digits)) {
7297 dn->digits=decShiftToMost(dn->lsu, dn->digits, dn->exponent);
7324 Int tinyexp=set->emin-dn->digits+1; /* precalculate subnormal boundary */
7361 if (dn->exponent<=set->emax-set->digits+1) return; /* neither needed */
7365 if (dn->exponent>set->emax-dn->digits+1) { /* too big */
7373 shift=dn->exponent-(set->emax-set->digits+1);
7377 dn->digits=decShiftToMost(dn->lsu, dn->digits, shift);
7401 if (set->clamp) emax-=set->digits-1; /* lower if clamping */
7443 Int count=set->digits; /* nines to add */
7444 dn->digits=count;
7455 dn->exponent=set->emax-set->digits+1;
7492 etiny=set->emin-(set->digits-1); /* smallest allowed exponent */
7522 workset.digits=dn->digits-adjust; /* set requested length */
7525 decSetCoeff(dn, &workset, dn->lsu, dn->digits, residue, status);
7535 dn->digits=decShiftToMost(dn->lsu, dn->digits, 1);
7564 if (set->digits>DEC_MAX_MATH
7567 else if ((rhs->digits>DEC_MAX_MATH
7568 || rhs->exponent+rhs->digits>DEC_MAX_MATH+1
7569 || rhs->exponent+rhs->digits<2*(1-DEC_MAX_MATH))
7593 Int ilength=dn->digits+dn->exponent; /* integral length */
7681 if (drop>=dn->digits) { /* losing the whole thing */
7683 if (drop>dn->digits)
7685 (LI)drop, (LI)dn->digits);
7688 dn->digits=1;
7691 msu=dn->lsu+D2U(dn->digits-drop)-1; /* -> likely msu */
7692 cut=MSUDIGITS(dn->digits-drop); /* digits to be in use in msu */
7695 dn->digits=decGetDigits(dn->lsu, static_cast<int32_t>(msu-dn->lsu+1));
7753 if (lhs->digits<=set->digits) uprv_decNumberCopy(res, lhs); /* easy */
7759 uresp1=res->lsu+D2U(set->digits);
7761 res->digits=D2U(set->digits)*DECDPUN;
7763 if (res->digits>set->digits) decDecap(res, res->digits-set->digits);
7816 Int digits=(len-1)*DECDPUN+1; /* possible digits excluding msu */ local
7827 if (digits==1) break; /* a zero has one digit */
7828 digits-=DECDPUN; /* adjust for 0 unit */
7833 digits++;
7836 digits++;
7839 digits++;
7841 for (pow=&powers[4]; *up>=*pow; pow++) digits++;
7848 return digits;
7877 if (dn->exponent==0 && dn->digits==1 && *dn->lsu==0) {
7885 up=dn->lsu+D2U(dn->digits)-1; /* msu */
7901 printf(" [%ld]\n", (LI)dn->digits);
7967 && (set->digits<1 || set->round>=DEC_ROUND_MAX)) {
7971 (LI)set->digits, (LI)set->round);
8006 Int ae, d, digits; /* .. */ local
8027 if (dn->digits!=1) {
8029 printf("Digits %ld (not 1) for an infinity.\n", (LI)dn->digits);
8036 decDumpAr('I', dn->lsu, D2U(dn->digits));
8045 if (dn->digits<1 || dn->digits>DECNUMMAXP) {
8047 printf("Digits %ld in number.\n", (LI)dn->digits);
8051 d=dn->digits;
8057 if (dn->digits>1 && *up<powers[d-1]) {
8067 (LI)*up, (LI)dn->digits, (LI)(up-dn->lsu), (LI)maxuint);
8076 ae=dn->exponent+dn->digits-1; /* adjusted exponent */
8079 digits=DECNUMMAXP;
8080 if (ae<emin-(digits-1)) {
8107 && (set->digits!=dn->digits) && !(dn->bits & DECSPECIAL)) {
8110 (LI)dn->digits);
8117 if (dn!=NULL && dn->digits==0) set->status|=DEC_Invalid_operation;