Lines Matching refs:lsu
383 for (up=dn->lsu; uin>0; up++) { in uprv_decNumberFromUInt32()
387 dn->digits=decGetDigits(dn->lsu, up-dn->lsu); in uprv_decNumberFromUInt32()
412 up=dn->lsu; /* -> lsu */ in uprv_decNumberToInt32()
448 up=dn->lsu; /* -> lsu */ in uprv_decNumberToUInt32()
672 if (d<=set->digits) res=dn->lsu; /* fits into supplied decNumber */ in uprv_decNumberFromString()
834 ua=lhs->lsu; /* bottom-up */ in uprv_decNumberAnd()
835 ub=rhs->lsu; /* .. */ in uprv_decNumberAnd()
836 uc=res->lsu; /* .. */ in uprv_decNumberAnd()
867 res->digits=decGetDigits(res->lsu, uc-res->lsu); in uprv_decNumberAnd()
1229 ua=rhs->lsu; /* bottom-up */ in uprv_decNumberInvert()
1230 uc=res->lsu; /* .. */ in uprv_decNumberInvert()
1254 res->digits=decGetDigits(res->lsu, uc-res->lsu); in uprv_decNumberInvert()
1470 if (!(copystat&DEC_Inexact) && w->lsu[0]==1) { in uprv_decNumberLog10()
1524 w->lsu[1]=1; w->lsu[0]=0; /* .. */ in uprv_decNumberLog10()
1526 w->lsu[0]=10; /* .. */ in uprv_decNumberLog10()
1705 dtiny.lsu[0]=1; /* make number that is .. */ in uprv_decNumberNextMinus()
1742 dtiny.lsu[0]=1; /* make number that is .. */ in uprv_decNumberNextPlus()
1805 dtiny.lsu[0]=1; /* make number that is .. */ in uprv_decNumberNextToward()
1849 ua=lhs->lsu; /* bottom-up */ in uprv_decNumberOr()
1850 ub=rhs->lsu; /* .. */ in uprv_decNumberOr()
1851 uc=res->lsu; /* .. */ in uprv_decNumberOr()
1881 res->digits=decGetDigits(res->lsu, uc-res->lsu); in uprv_decNumberOr()
2033 dnOne.lsu[0]=1; in uprv_decNumberPower()
2039 else if (dac->lsu[0]==0) { /* lhs=1 */ in uprv_decNumberPower()
2042 *res->lsu=1; /* was 0, make int 1 */ in uprv_decNumberPower()
2043 res->digits=decShiftToMost(res->lsu, 1, shift); in uprv_decNumberPower()
2071 if (n==0) *res->lsu=1; /* [-]Inf**0 => 1 */ in uprv_decNumberPower()
2089 *res->lsu=1; /* return 1 */ in uprv_decNumberPower()
2143 *res->lsu=1; /* .. */ in uprv_decNumberPower()
2180 *dac->lsu=1; /* was 0, make int 1 */ in uprv_decNumberPower()
2183 dac->digits=decShiftToMost(dac->lsu, 1, shift); in uprv_decNumberPower()
2197 *dac->lsu=1; /* .. */ in uprv_decNumberPower()
2513 Unit *msu=res->lsu+D2U(res->digits)-1; /* current msu */ in uprv_decNumberRotate()
2514 Unit *msumax=res->lsu+D2U(set->digits)-1; /* rotation msu */ in uprv_decNumberRotate()
2554 uInt save=res->lsu[0]%powers[shift]; /* save low digit(s) */ in uprv_decNumberRotate()
2555 decShiftToLeast(res->lsu, D2U(res->digits), shift); in uprv_decNumberRotate()
2574 uInt save=res->lsu[0]%powers[shift]; /* save low digit(s) */ in uprv_decNumberRotate()
2575 decShiftToLeast(res->lsu, units, shift); in uprv_decNumberRotate()
2581 decReverse(res->lsu+units, msumax); /* left part */ in uprv_decNumberRotate()
2582 decReverse(res->lsu, res->lsu+units-1); /* right part */ in uprv_decNumberRotate()
2583 decReverse(res->lsu, msumax); /* whole */ in uprv_decNumberRotate()
2587 res->digits=decGetDigits(res->lsu, msumax-res->lsu+1); in uprv_decNumberRotate()
2620 *res->lsu=ret; in uprv_decNumberSameQuantum()
2722 *res->lsu=0; /* so place 0 */ in uprv_decNumberShift()
2732 if (res->digits>1 || *res->lsu) /* if non-zero.. */ in uprv_decNumberShift()
2733 res->digits=decShiftToMost(res->lsu, res->digits, shift); in uprv_decNumberShift()
2738 *res->lsu=0; /* so place 0 */ in uprv_decNumberShift()
2742 decShiftToLeast(res->lsu, D2U(res->digits), -shift); in uprv_decNumberShift()
2964 t->lsu[0]=259; in uprv_decNumberSquareRoot()
2965 a->lsu[0]=819; in uprv_decNumberSquareRoot()
2967 t->lsu[0]=59; t->lsu[1]=2; in uprv_decNumberSquareRoot()
2968 a->lsu[0]=19; a->lsu[1]=8; in uprv_decNumberSquareRoot()
2970 t->lsu[0]=9; t->lsu[1]=5; t->lsu[2]=2; in uprv_decNumberSquareRoot()
2971 a->lsu[0]=9; a->lsu[1]=1; a->lsu[2]=8; in uprv_decNumberSquareRoot()
2981 t->lsu[0]=819; in uprv_decNumberSquareRoot()
2982 a->lsu[0]=259; in uprv_decNumberSquareRoot()
2984 t->lsu[0]=19; t->lsu[1]=8; in uprv_decNumberSquareRoot()
2985 a->lsu[0]=59; a->lsu[1]=2; in uprv_decNumberSquareRoot()
2987 t->lsu[0]=9; t->lsu[1]=1; t->lsu[2]=8; in uprv_decNumberSquareRoot()
2988 a->lsu[0]=9; a->lsu[1]=5; a->lsu[2]=2; in uprv_decNumberSquareRoot()
3000 t->lsu[0]=5; /* .. */ in uprv_decNumberSquareRoot()
3053 t->lsu[0]=1; /* .. */ in uprv_decNumberSquareRoot()
3067 t->lsu[0]=1; /* .. */ in uprv_decNumberSquareRoot()
3120 decShiftToLeast(a->lsu, D2U(a->digits), todrop); in uprv_decNumberSquareRoot()
3279 ua=lhs->lsu; /* bottom-up */ in uprv_decNumberXor()
3280 ub=rhs->lsu; /* .. */ in uprv_decNumberXor()
3281 uc=res->lsu; /* .. */ in uprv_decNumberXor()
3311 res->digits=decGetDigits(res->lsu, uc-res->lsu); in uprv_decNumberXor()
3396 dest->lsu[0]=src->lsu[0]; in uprv_decNumberCopy()
3402 d=dest->lsu+1; /* -> first destination */ in uprv_decNumberCopy()
3403 smsup=src->lsu+D2U(src->digits); /* -> source msu+1 */ in uprv_decNumberCopy()
3404 for (s=src->lsu+1; s<smsup; s++, d++) *d=*s; in uprv_decNumberCopy()
3488 const Unit *up=dn->lsu; /* Unit pointer, -> lsu */ in uprv_decNumberGetBCD()
3521 Unit *up=dn->lsu+D2U(dn->digits)-1; /* -> msu [target pointer] */ in uprv_decNumberSetBCD()
3529 for (;up>=dn->lsu; up--) { /* each Unit from msu */ in uprv_decNumberSetBCD()
3626 dn->lsu[0]=0; in uprv_decNumberZero()
3656 const Unit *up=dn->lsu+D2U(dn->digits)-1; /* -> msu [input pointer] */ in decToString()
3683 if (exp!=0 || (*dn->lsu==0 && dn->digits==1)) return; in decToString()
3692 for (;up>=dn->lsu; up--) { /* each Unit from msu */ in decToString()
3737 if (up==dn->lsu) break; /* out of input digits (pre>digits) */ in decToString()
3748 if (up==dn->lsu) break; /* out of input digits */ in decToString()
3764 if (up==dn->lsu) break; /* out of input digits */ in decToString()
3926 res->digits=decShiftToMost(res->lsu, res->digits, -adjust); in decAddOp()
3953 res->digits=decShiftToMost(res->lsu, res->digits, -adjust); in decAddOp()
3977 Int partial=*lhs->lsu; in decAddOp()
3979 partial+=*rhs->lsu; in decAddOp()
3984 *res->lsu=(Unit)partial; /* [copy could have overwritten RHS] */ in decAddOp()
3990 partial-=*rhs->lsu; in decAddOp()
3993 *res->lsu=(Unit)partial; in decAddOp()
3995 res->digits=decGetDigits(res->lsu, D2U(res->digits)); in decAddOp()
4040 res->digits=decShiftToMost(res->lsu, res->digits, shift); in decAddOp()
4061 acc=res->lsu; /* assume add direct to result */ in decAddOp()
4085 decDumpAr('A', lhs->lsu, D2U(lhs->digits)); in decAddOp()
4086 decDumpAr('B', rhs->lsu, D2U(rhs->digits)); in decAddOp()
4093 res->digits=decUnitAddSub(lhs->lsu, D2U(lhs->digits), in decAddOp()
4094 rhs->lsu, D2U(rhs->digits), in decAddOp()
4109 if (acc!=res->lsu) { in decAddOp()
4151 res->digits=decGetDigits(res->lsu, D2U(res->digits)); in decAddOp()
4477 source=lhs->lsu+D2U(lhs->digits)-1; /* msu of input array */ in decDivideOp()
4478 for (target=msu1; source>=lhs->lsu; source--, target--) *target=*source; in decDivideOp()
4484 var2=rhs->lsu; /* -> rhs array */ in decDivideOp()
4656 Unit lsu=*accnext; in decDivideOp() local
4657 if (!(lsu&0x01) && (lsu!=0)) { in decDivideOp()
4663 if ((lsu-QUOT10(lsu, drop+1) in decDivideOp()
4666 if (lsu%powers[drop+1]!=0) break; /* found non-0 digit */ in decDivideOp()
4748 compare=decUnitCompare(accnext, tarunits, rhs->lsu, D2U(rhs->digits), in decDivideOp()
4796 rhs->lsu, D2U(rhs->digits), in decDivideOp()
5027 for (count=lhs->digits, cup=lhs->lsu, lip=zlhi; count>0; lip++) in decMultiplyOp()
5032 for (count=rhs->digits, cup=rhs->lsu, rip=zrhi; count>0; rip++) in decMultiplyOp()
5125 mermsup=rhs->lsu+D2U(rhs->digits); /* -> msu+1 of multiplier */ in decMultiplyOp()
5127 for (mer=rhs->lsu; mer<mermsup; mer++) { in decMultiplyOp()
5131 lhs->lsu, madlength, 0, in decMultiplyOp()
5314 *res->lsu=1; /* .. */ in decExpOp()
5332 *d->lsu=4; /* set 4 .. */ in decExpOp()
5342 *res->lsu=1; /* .. */ in decExpOp()
5343 res->digits=decShiftToMost(res->lsu, 1, shift); in decExpOp()
5369 *a->lsu=2; /* not 1 but < exp(1) */ in decExpOp()
5450 uprv_decNumberZero(a); *a->lsu=1; /* accumulator=1 */ in decExpOp()
5451 uprv_decNumberZero(d); *d->lsu=2; /* divisor=2 */ in decExpOp()
5452 uprv_decNumberZero(&numone); *numone.lsu=1; /* constant 1 for increment */ in decExpOp()
5501 uprv_decNumberZero(t); *t->lsu=1; /* acc=1 */ in decExpOp()
5679 if (rhs->lsu[0]==0 && rhs->lsu[1]==1 && rhs->digits==2) { /* ln(10) */
5681 if (rhs->lsu[0]==10 && rhs->digits==2) { /* ln(10) */
5688 if (rhs->lsu[0]==2 && rhs->digits==1) { /* ln(2) */
5760 uprv_decNumberZero(&numone); *numone.lsu=1; /* constant 1 for adjustment */
5809 if (cmp.lsu[0]==0) a->exponent=0; /* yes, exact 0 */
5977 res->digits=decShiftToMost(res->lsu, res->digits, 1); /* shift */
5991 res->digits=decShiftToMost(res->lsu, res->digits, -adjust);
6107 result=decUnitCompare(lhs->lsu, D2U(lhs->digits),
6108 rhs->lsu, D2U(rhs->digits), 0);
6149 *res->lsu=1;
6251 compare=decUnitCompare(lhs->lsu, D2U(lhs->digits),
6252 rhs->lsu, D2U(rhs->digits),
6645 || (*dn->lsu & 0x01)) return dn; /* .. or odd */
6654 up=dn->lsu; /* -> current Unit */
6687 decShiftToLeast(dn->lsu, D2U(dn->digits), d);
6889 decSetCoeff(dest, set, src->lsu, src->digits, residue, status);
6931 static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, argument
6944 if (dn->lsu!=lsu) { /* copy needed */
6947 up=lsu;
6948 for (target=dn->lsu; count>0; target++, up++, count-=DECDPUN)
6967 for (up=lsu; count>0; up++, count-=DECDPUN) if (*up!=0) { /* found non-0 */
6973 *dn->lsu=0; /* coefficient will now be 0 */
6985 for (up=lsu;; up++) {
7004 *dn->lsu=0; /* .. result is 0 */
7012 for (target=dn->lsu; count>0; target++, up++, count-=DECDPUN)
7050 *dn->lsu=0; /* .. result is 0 */
7057 for (target=dn->lsu; ; target++) {
7130 Int lsd5=*dn->lsu%5; /* get lsd and quintate */
7149 if (*dn->lsu & 0x01) bump=1;
7202 for (up=dn->lsu; ; up++) {
7208 for (up=up-1; up>=dn->lsu; up--) *up=0; /* others all to 0 */
7226 for (up=dn->lsu; ; up++) {
7234 for (up=up-1; up>=dn->lsu; up--) *up=(Unit)powers[DECDPUN]-1;
7262 decUnitAddSub(dn->lsu, D2U(dn->digits), uarrone, 1, 0, dn->lsu, bump);
7293 dn->digits=decShiftToMost(dn->lsu, dn->digits, dn->exponent);
7339 nmin.lsu[0]=1;
7373 dn->digits=decShiftToMost(dn->lsu, dn->digits, shift);
7442 for (up=dn->lsu; ; up++) {
7521 decSetCoeff(dn, &workset, dn->lsu, dn->digits, residue, status);
7531 dn->digits=decShiftToMost(dn->lsu, dn->digits, 1);
7602 up=dn->lsu; /* ready for lsu */
7683 dn->lsu[0]=0;
7687 msu=dn->lsu+D2U(dn->digits-drop)-1; /* -> likely msu */
7691 dn->digits=decGetDigits(dn->lsu, msu-dn->lsu+1);
7755 uresp1=res->lsu+D2U(set->digits);
7756 for (ur=res->lsu, ul=lhs->lsu; ur<uresp1; ur++, ul++) *ur=*ul;
7873 if (dn->exponent==0 && dn->digits==1 && *dn->lsu==0) {
7881 up=dn->lsu+D2U(dn->digits)-1; /* msu */
7883 for (up=up-1; up>=dn->lsu; up--) {
8028 if (*dn->lsu!=0) {
8030 printf("LSU %ld (not 0) for an infinity.\n", (LI)*dn->lsu);
8032 decDumpAr('I', dn->lsu, D2U(dn->digits));
8049 for (up=dn->lsu; d>0; up++) {
8063 (LI)*up, (LI)dn->digits, (LI)(up-dn->lsu), (LI)maxuint);