Home | History | Annotate | Download | only in i18n

Lines Matching defs:up

60 /*    precision (up to 999,999,999 digits) and arbitrary exponent     */
158 /* numbers up to four digits, using appropriate constants. This */
233 /* of 17 [we only need up to **4] */
378 Unit *up; /* work pointer */
381 for (up=dn->lsu; uin>0; up++) {
382 *up=(Unit)(uin%(DECDPUNMAX+1));
385 dn->digits=decGetDigits(dn->lsu, up-dn->lsu);
408 const Unit *up; /* .. */
410 up=dn->lsu; /* -> lsu */
411 lo=*up; /* get 1 to 9 digits */
416 up++;
418 for (d=DECDPUN; d<dn->digits; up++, d+=DECDPUN) hi+=*up*powers[d-1];
444 const Unit *up; /* .. */
446 up=dn->lsu; /* -> lsu */
447 lo=*up; /* get 1 to 9 digits */
452 up++;
454 for (d=DECDPUN; d<dn->digits; up++, d+=DECDPUN) hi+=*up*powers[d-1];
521 Unit *up; /* .. */
638 /* [up to 1999999999 is OK, for example 1E-1000000998] */
686 up=res+D2U(d)-1; /* -> msu */
687 cut=d-(up-res)*DECDPUN; /* digits in top unit */
694 *up=(Unit)out; /* write unit */
695 up--; /* prepare for unit below.. */
699 *up=(Unit)out; /* write lsu */
703 up=res; /* -> lsu */
705 if (*c=='.') continue; /* ignore . [don't step up] */
706 *up=(Unit)((Int)*c-(Int)'0');
707 up++;
832 ua=lhs->lsu; /* bottom-up */
1059 /* almost always be correctly rounded, but may be up to 1 ulp in */
1148 /* set up context for multiply */
1154 /* set up decNumber space to receive the result of the multiply */
1227 ua=rhs->lsu; /* bottom-up */
1279 /* almost always be correctly rounded, but may be up to 1 ulp in */
1398 /* almost always be correctly rounded, but may be up to 1 ulp in */
1520 uprv_decNumberZero(w); /* set up 10... */
1847 ua=lhs->lsu; /* bottom-up */
1965 /* almost always be correctly rounded, but may be up to 1 ulp in */
2030 uprv_decNumberZero(&dnOne); /* set up 1 */
2168 /* here, aset is set up and accumulator is ready for use */
2518 /* 1. shift all to least up to one unit to unit-align final */
2856 /* buffer for temporary variable, up to 3 digits */
2858 decNumber *t=buft; /* up-to-3-digit constant or work */
2945 /* set up working context */
3277 ua=lhs->lsu; /* bottom-up */
3486 const Unit *up=dn->lsu; /* Unit pointer, -> lsu */
3489 for (; ub>=bcd; ub--, up++) *ub=*up;
3491 uInt u=*up; /* work */
3498 up++;
3499 u=*up;
3519 Unit *up=dn->lsu+D2U(dn->digits)-1; /* -> msu [target pointer] */
3523 for (; ub<bcd+n; ub++, up--) *up=*ub;
3527 for (;up>=dn->lsu; up--) { /* each Unit from msu */
3528 *up=0; /* will take <=DECDPUN digits */
3529 for (; cut>0; ub++, cut--) *up=X10(*up)+*ub;
3654 const Unit *up=dn->lsu+D2U(dn->digits)-1; /* -> msu [input pointer] */
3690 for (;up>=dn->lsu; up--) { /* each Unit from msu */
3691 u=*up; /* contains DECDPUN digits to lay out */
3730 u=*up;
3735 if (up==dn->lsu) break; /* out of input digits (pre>digits) */
3736 up--;
3738 u=*up;
3746 if (up==dn->lsu) break; /* out of input digits */
3747 up--;
3749 u=*up;
3762 if (up==dn->lsu) break; /* out of input digits */
3763 up--;
3765 u=*up;
4004 /* other) padding with up to DIGITS-1 trailing zeros may be */
4027 /* so only need to pad up to a length of DIGITS+1. */
4111 /* remove leading zeros that were added due to rounding up to */
4129 /* remove leading zeros that added due to rounding up to */
4240 /* 1) to accumulate the result, and the other (up to 2*digits+1) for */
4429 /* Long (slow) division is needed; roll up the sleeves... */
4484 /* now set up the variables which will be used for estimating the */
4649 /* Had an exact division; clean up spurious trailing 0s. */
4735 Unit *up; /* .. */
4754 for (up=accnext; up<accnext+tarunits; up++) {
4756 half=*up & 0x01;
4757 *up/=2; /* [shift] */
4759 *(up-1)+=(DECDPUNMAX+1)/2;
4765 /* This is effectively causing round-up of the quotient, */
4771 for (up=quotlsu; ; up++) {
4773 if (*up!=DECDPUNMAX) break;/* non-nines */
4776 if (*up==powers[quotdigits]-1) allnines=1;
4780 } /* up */
4856 /* fastpath can speed up some 16-digit operations by 10x (and much */
4917 Unit *up; /* .. */
5000 /* (rounded up to a multiple of 8 bytes), and the uLong */
5042 /* Each uLong item in the accumulator can hold values up to */
5065 /* spin up the accumulator resolving overflows */
5089 /* each item in the accumulator (which will become up to N */
5091 for (lp=zacc, up=acc; lp<zacc+iacc; lp++) {
5093 for (p=0; p<FASTDIGS-DECDPUN; p+=DECDPUN, up++) {
5095 *up=(Unit)(item-(part*(DECDPUNMAX+1)));
5098 *up=(Unit)item; up++; /* [final needs no division] */
5100 accunits=up-acc; /* count of units */
5201 /* almost always be correctly rounded, but may be up to 1 ulp in */
5346 /* set up the context to be used for calculating a, as this is */
5363 /* set up here so Power call below will over or underflow to */
5379 /* Apply as much as possible, up to a MAXLEVER digits, which */
5388 use+=h; /* [may end up subnormal] */
5452 /* set up the contexts for calculating a, t, and d */
5584 /* almost always be correctly rounded, but may be up to 1 ulp in */
5606 /* 3. Fastpaths are included for ln(10) and ln(2), up to length 40, */
5613 /* iterations will be neede -- so this would only speed up by */
5703 /* be able to hold p digits, and the adjustment up to */
5748 t=LNnn[t-10]; /* look up ln(b) */
5754 /* the initial estimate is now in a, with up to 4 digits correct. */
5765 /* set up a context to be used for the multiply and subtract */
5771 /* up to a maximum of p */
5949 /* if adjusted coefficient will definitely not fit, give up now */
6076 /* If total ordering then handle differing signs 'up front' */
6325 /* clean up and return the result */
6510 /* magnitude up to DECDPUNMAX squared */
6635 Unit *up; /* -> current Unit */
6652 up=dn->lsu; /* -> current Unit */
6656 uInt quot=QUOT10(*up, cut);
6657 if ((*up-quot*powers[cut])!=0) break; /* found non-0 digit */
6659 if (*up%powers[cut]!=0) break; /* found non-0 digit */
6671 up++;
6744 first=uar+D2U(digits+shift)-1; /* where msu of source will end up */
6782 Unit *target, *up; /* work */
6795 up=uar+D2U(shift);
6796 for (; up<uar+units; target++, up++) *target=*up;
6801 up=uar+D2U(shift-cut); /* source; correct to whole Units */
6804 quot=QUOT10(*up, cut);
6806 quot=*up/powers[cut];
6812 up++;
6813 quot=*up;
6816 rem=*up-quot*powers[cut];
6933 const Unit *up; /* work */
6945 up=lsu;
6946 for (target=dn->lsu; count>0; target++, up++, count-=DECDPUN)
6947 *target=*up;
6965 for (up=lsu; count>0; up++, count-=DECDPUN) if (*up!=0) { /* found non-0 */
6979 /* spin up the number, noting residue during the spin, until get to */
6983 for (up=lsu;; up++) {
6986 if (*up!=0) *residue=1;
6987 } /* up */
6989 /* here up -> Unit with first discarded digit */
6994 if (*up>=half) {
6995 if (*up>half) *residue=7;
6999 if (*up!=0) *residue=3; /* [else is 0, leave as sticky bit] */
7006 count=set->digits; /* now digits to end up with */
7008 up++; /* move to next */
7010 for (target=dn->lsu; count>0; target++, up++, count-=DECDPUN)
7011 *target=*up;
7018 if (cut==0) quot=*up; /* is at bottom of unit */
7022 quot=QUOT10(*up, cut);
7023 rem=*up-quot*powers[cut];
7025 rem=*up%powers[cut];
7026 quot=*up/powers[cut];
7044 /* here: up -> Unit of the array with bottom digit */
7052 count=set->digits; /* now digits to end up with */
7059 up++;
7060 quot=*up;
7063 rem=*up-quot*powers[cut];
7122 case DEC_ROUND_05UP: { /* round zero or five up (for reround) */
7127 /* case it is bumped down and then up -- a no-op) */
7144 if (residue>5) bump=1; /* >0.5 goes up */
7146 /* 0.5 goes up iff [new] lsd is odd */
7189 /* now bump the number, up or down, if need be */
7192 /* Simply use decUnitAddSub unless bumping up and the number is */
7198 Unit *up; /* work */
7200 for (up=dn->lsu; ; up++) {
7203 if (*up!=powers[count]-1) break; /* not still 9s */
7205 *up=(Unit)powers[count-1]; /* here 999 -> 100 etc. */
7206 for (up=up-1; up>=dn->lsu; up--) *up=0; /* others all to 0 */
7215 if (*up!=DECDPUNMAX) break; /* not still 9s */
7217 } /* up */
7222 Unit *up, *sup; /* work */
7224 for (up=dn->lsu; ; up++) {
7227 if (*up!=powers[count-1]) break; /* not 100.. */
7229 sup=up; /* save msu pointer */
7230 *up=(Unit)powers[count]-1; /* here 100 in msu -> 999 */
7232 for (up=up-1; up>=dn->lsu; up--) *up=(Unit)powers[DECDPUN]-1;
7253 if (*up!=0) break; /* not still 0s */
7255 } /* up */
7322 /* be up to twice the expected]. */
7436 Unit *up; /* work */
7440 for (up=dn->lsu; ; up++) {
7441 if (count>DECDPUN) *up=DECDPUNMAX; /* unit full o'nines */
7443 *up=(Unit)(powers[count]-1);
7447 } /* up */
7526 /* if rounded up a 999s case, exponent will be off by one; adjust */
7585 const Unit *up; /* work */
7600 up=dn->lsu; /* ready for lsu */
7608 /* spin up whole units until reach the Unit with the unit digit */
7609 for (; count>=DECDPUN; up++) {
7610 if (*up!=0) return BADINT; /* non-zero Unit to discard */
7618 theInt=QUOT10(*up, count);
7619 rem=*up-theInt*powers[count];
7621 rem=*up%powers[count]; /* slice off discards */
7622 theInt=*up/powers[count];
7627 up++; /* ready for next */
7632 /* tricky code now, to accumulate up to 9.3 digits */
7633 if (got==0) {theInt=*up; got+=DECDPUN; up++;} /* ensure lsu is there */
7638 for (; got<ilength; up++) {
7639 theInt+=*up*powers[got];
7643 if (theInt/(Int)powers[got-DECDPUN]!=(Int)*(up-1)) ilength=11;
7734 /* This decision tree ends up with LHS being the source pointer, */
7784 /* if cause was an sNaN, clear and propagate [NaN is already set up] */
7809 Unit *up=uar+(len-1); /* -> msu */
7819 for (; up>=uar; up--) {
7820 if (*up==0) { /* unit is all 0s */
7826 if (*up<10) break; /* is 1-9 */
7829 if (*up<100) break; /* is 10-99 */
7832 if (*up<1000) break; /* is 100-999 */
7835 for (pow=&powers[4]; *up>=*pow; pow++) digits++;
7841 } /* up */
7855 const Unit *up; /* work */
7879 up=dn->lsu+D2U(dn->digits)-1; /* msu */
7880 printf("%ld", (LI)*up);
7881 for (up=up-1; up>=dn->lsu; up--) {
7882 u=*up;
7889 } /* up */
7998 const Unit *up; /* work */
8047 for (up=dn->lsu; d>0; up++) {
8051 if (dn->digits>1 && *up<powers[d-1]) {
8058 if (*up>maxuint) {
8061 (LI)*up, (LI)dn->digits, (LI)(up-dn->lsu), (LI)maxuint);