Home | History | Annotate | Download | only in i18n

Lines Matching defs:lsu

167 /*      lsu -- least significant Unit (of coefficient)                */
383 for (up=dn->lsu; uin>0; up++) {
387 dn->digits=decGetDigits(dn->lsu, up-dn->lsu);
412 up=dn->lsu; /* -> lsu */
448 up=dn->lsu; /* -> lsu */
672 if (d<=set->digits) res=dn->lsu; /* fits into supplied decNumber */
682 /* res now -> number lsu, buffer, or allocated storage for Unit array */
701 *up=(Unit)out; /* write lsu */
705 up=res; /* -> lsu */
834 ua=lhs->lsu; /* bottom-up */
835 ub=rhs->lsu; /* .. */
836 uc=res->lsu; /* .. */
867 res->digits=decGetDigits(res->lsu, uc-res->lsu);
1229 ua=rhs->lsu; /* bottom-up */
1230 uc=res->lsu; /* .. */
1254 res->digits=decGetDigits(res->lsu, uc-res->lsu);
1470 if (!(copystat&DEC_Inexact) && w->lsu[0]==1) {
1524 w->lsu[1]=1; w->lsu[0]=0; /* .. */
1526 w->lsu[0]=10; /* .. */
1705 dtiny.lsu[0]=1; /* make number that is .. */
1742 dtiny.lsu[0]=1; /* make number that is .. */
1805 dtiny.lsu[0]=1; /* make number that is .. */
1849 ua=lhs->lsu; /* bottom-up */
1850 ub=rhs->lsu; /* .. */
1851 uc=res->lsu; /* .. */
1881 res->digits=decGetDigits(res->lsu, uc-res->lsu);
2033 dnOne.lsu[0]=1;
2039 else if (dac->lsu[0]==0) { /* lhs=1 */
2042 *res->lsu=1; /* was 0, make int 1 */
2043 res->digits=decShiftToMost(res->lsu, 1, shift);
2071 if (n==0) *res->lsu=1; /* [-]Inf**0 => 1 */
2089 *res->lsu=1; /* return 1 */
2143 *res->lsu=1; /* .. */
2180 *dac->lsu=1; /* was 0, make int 1 */
2183 dac->digits=decShiftToMost(dac->lsu, 1, shift);
2197 *dac->lsu=1; /* .. */
2513 Unit *msu=res->lsu+D2U(res->digits)-1; /* current msu */
2514 Unit *msumax=res->lsu+D2U(set->digits)-1; /* rotation msu */
2554 uInt save=res->lsu[0]%powers[shift]; /* save low digit(s) */
2555 decShiftToLeast(res->lsu, D2U(res->digits), shift);
2574 uInt save=res->lsu[0]%powers[shift]; /* save low digit(s) */
2575 decShiftToLeast(res->lsu, units, shift);
2581 decReverse(res->lsu+units, msumax); /* left part */
2582 decReverse(res->lsu, res->lsu+units-1); /* right part */
2583 decReverse(res->lsu, msumax); /* whole */
2587 res->digits=decGetDigits(res->lsu, msumax-res->lsu+1);
2620 *res->lsu=ret;
2722 *res->lsu=0; /* so place 0 */
2732 if (res->digits>1 || *res->lsu) /* if non-zero.. */
2733 res->digits=decShiftToMost(res->lsu, res->digits, shift);
2738 *res->lsu=0; /* so place 0 */
2742 decShiftToLeast(res->lsu, D2U(res->digits), -shift);
2964 t->lsu[0]=259;
2965 a->lsu[0]=819;
2967 t->lsu[0]=59; t->lsu[1]=2;
2968 a->lsu[0]=19; a->lsu[1]=8;
2970 t->lsu[0]=9; t->lsu[1]=5; t->lsu[2]=2;
2971 a->lsu[0]=9; a->lsu[1]=1; a->lsu[2]=8;
2981 t->lsu[0]=819;
2982 a->lsu[0]=259;
2984 t->lsu[0]=19; t->lsu[1]=8;
2985 a->lsu[0]=59; a->lsu[1]=2;
2987 t->lsu[0]=9; t->lsu[1]=1; t->lsu[2]=8;
2988 a->lsu[0]=9; a->lsu[1]=5; a->lsu[2]=2;
3000 t->lsu[0]=5; /* .. */
3053 t->lsu[0]=1; /* .. */
3067 t->lsu[0]=1; /* .. */
3120 decShiftToLeast(a->lsu, D2U(a->digits), todrop);
3279 ua=lhs->lsu; /* bottom-up */
3280 ub=rhs->lsu; /* .. */
3281 uc=res->lsu; /* .. */
3311 res->digits=decGetDigits(res->lsu, uc-res->lsu);
3390 /* more than just the lsu (for small DECDPUN). This would not affect */
3396 dest->lsu[0]=src->lsu[0];
3402 d=dest->lsu+1; /* -> first destination */
3403 smsup=src->lsu+D2U(src->digits); /* -> source msu+1 */
3404 for (s=src->lsu+1; s<smsup; s++, d++) *d=*s;
3488 const Unit *up=dn->lsu; /* Unit pointer, -> lsu */
3521 Unit *up=dn->lsu+D2U(dn->digits)-1; /* -> msu [target pointer] */
3529 for (;up>=dn->lsu; up--) { /* each Unit from msu */
3626 dn->lsu[0]=0;
3656 const Unit *up=dn->lsu+D2U(dn->digits)-1; /* -> msu [input pointer] */
3683 if (exp!=0 || (*dn->lsu==0 && dn->digits==1)) return;
3692 for (;up>=dn->lsu; up--) { /* each Unit from msu */
3737 if (up==dn->lsu) break; /* out of input digits (pre>digits) */
3748 if (up==dn->lsu) break; /* out of input digits */
3764 if (up==dn->lsu) break; /* out of input digits */
3926 res->digits=decShiftToMost(res->lsu, res->digits, -adjust);
3953 res->digits=decShiftToMost(res->lsu, res->digits, -adjust);
3977 Int partial=*lhs->lsu;
3979 partial+=*rhs->lsu;
3984 *res->lsu=(Unit)partial; /* [copy could have overwritten RHS] */
3990 partial-=*rhs->lsu;
3993 *res->lsu=(Unit)partial;
3995 res->digits=decGetDigits(res->lsu, D2U(res->digits));
4040 res->digits=decShiftToMost(res->lsu, res->digits, shift);
4061 acc=res->lsu; /* assume add direct to result */
4085 decDumpAr('A', lhs->lsu, D2U(lhs->digits));
4086 decDumpAr('B', rhs->lsu, D2U(rhs->digits));
4093 res->digits=decUnitAddSub(lhs->lsu, D2U(lhs->digits),
4094 rhs->lsu, D2U(rhs->digits),
4109 if (acc!=res->lsu) {
4151 res->digits=decGetDigits(res->lsu, D2U(res->digits));
4477 source=lhs->lsu+D2U(lhs->digits)-1; /* msu of input array */
4478 for (target=msu1; source>=lhs->lsu; source--, target--) *target=*source;
4484 var2=rhs->lsu; /* -> rhs array */
4576 /* The var2 msu is one unit towards the lsu of the var1 msu, */
4635 /* if early stop), starting at accnext+1 (its lsu) */
4656 Unit lsu=*accnext;
4657 if (!(lsu&0x01) && (lsu!=0)) {
4660 for (;; drop++) { /* [will terminate because lsu!=0] */
4663 if ((lsu-QUOT10(lsu, drop+1)
4666 if (lsu%powers[drop+1]!=0) break; /* found non-0 digit */
4748 compare=decUnitCompare(accnext, tarunits, rhs->lsu, D2U(rhs->digits),
4754 /* now restore the remainder by dividing by two; the lsu */
4796 rhs->lsu, D2U(rhs->digits),
5027 for (count=lhs->digits, cup=lhs->lsu, lip=zlhi; count>0; lip++)
5032 for (count=rhs->digits, cup=rhs->lsu, rip=zrhi; count>0; rip++)
5118 /* is no advantage in calculating from msu to lsu. So, do it */
5122 *acc=0; /* .. (lsu=0) */
5125 mermsup=rhs->lsu+D2U(rhs->digits); /* -> msu+1 of multiplier */
5127 for (mer=rhs->lsu; mer<mermsup; mer++) {
5131 lhs->lsu, madlength, 0,
5314 *res->lsu=1; /* .. */
5332 *d->lsu=4; /* set 4 .. */
5342 *res->lsu=1; /* .. */
5343 res->digits=decShiftToMost(res->lsu, 1, shift);
5369 *a->lsu=2; /* not 1 but < exp(1) */
5450 uprv_decNumberZero(a); *a->lsu=1; /* accumulator=1 */
5451 uprv_decNumberZero(d); *d->lsu=2; /* divisor=2 */
5452 uprv_decNumberZero(&numone); *numone.lsu=1; /* constant 1 for increment */
5501 uprv_decNumberZero(t); *t->lsu=1; /* acc=1 */
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),
6265 /* Arg1 is A first Unit (lsu) */
6267 /* Arg3 is B first Unit (lsu) */
6350 /* C is filled from the lsu; only those units necessary to complete */
6353 /* Arg1 is A first Unit (lsu) */
6355 /* Arg3 is B first Unit (lsu) */
6358 /* Arg6 is C first Unit (lsu) */
6382 const Unit *alsu=a; /* A lsu [need to remember it] */
6645 || (*dn->lsu & 0x01)) return dn; /* .. or odd */
6654 up=dn->lsu; /* -> current Unit */
6687 decShiftToLeast(dn->lsu, D2U(dn->digits), d);
6775 /* shift is the number of digits to remove from the lsu end; it */
6889 decSetCoeff(dest, set, src->lsu, src->digits, residue, status);
6898 /* lsu -> lsu of the source coefficient [may be dn->lsu] */
6908 /* external intermediate array. If it is in the number, lsu must == */
6909 /* dn->lsu and len must == dn->digits. */
6913 /* if dn->lsu==lsu). */
6920 /* dn->digits, dn->lsu (and as required), and dn->exponent are */
6931 static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
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 */
7635 if (got==0) {theInt=*up; got+=DECDPUN; up++;} /* ensure lsu is there */
7672 /* which will also be removed). Only dn->lsu and dn->digits change. */
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);