• Home
  • Raw
  • Download

Lines Matching refs:residue

512   Int   residue;                   /* rounding residue  */  in uprv_decNumberFromString()  local
704 residue=0; in uprv_decNumberFromString()
705 decSetCoeff(dn, set, res, d, &residue, &status); in uprv_decNumberFromString()
707 decFinalize(dn, set, &residue, &status); in uprv_decNumberFromString()
713 residue=0; in uprv_decNumberFromString()
714 decFinalize(dn, set, &residue, &status); in uprv_decNumberFromString()
1448 Int residue=0; /* (no residue) */ in uprv_decNumberLog10() local
1453 decCopyFit(w, rhs, &aset, &residue, &copystat); /* copy & shorten */ in uprv_decNumberLog10()
1461 residue=0; in uprv_decNumberLog10()
1462 decCopyFit(res, w, set, &residue, &status); /* copy & round */ in uprv_decNumberLog10()
1463 decFinish(res, set, &residue, &status); /* cleanup/set flags */ in uprv_decNumberLog10()
1974 Int residue=0; /* rounding residue */ in uprv_decNumberPower() local
2247 decFinalize(dac, set, &residue, &status); in uprv_decNumberPower()
2262 decCopyFit(res, dac, set, &residue, &status); in uprv_decNumberPower()
2263 decFinish(res, set, &residue, &status); /* final cleanup */ in uprv_decNumberPower()
2331 Int residue=0; /* as usual */ in uprv_decNumberReduce() local
2358 decCopyFit(res, rhs, set, &residue, &status); /* copy & round */ in uprv_decNumberReduce()
2359 decFinish(res, set, &residue, &status); /* cleanup/set flags */ in uprv_decNumberReduce()
2628 Int residue; /* work */ in uprv_decNumberScaleB() local
2651 residue=0; in uprv_decNumberScaleB()
2652 decFinalize(res, set, &residue, &status); /* .. and check */ in uprv_decNumberScaleB()
2820 Int residue=0; /* rounding residue */ in uprv_decNumberSquareRoot() local
2886 decFinish(res, set, &residue, &status); in uprv_decNumberSquareRoot()
3006 residue=0; /* .. and accumulator */ in uprv_decNumberSquareRoot()
3007 decCopyFit(a, a, &approxset, &residue, &rstatus); /* reduce (if needed) */ in uprv_decNumberSquareRoot()
3008 decFinish(a, &approxset, &residue, &rstatus); /* clean and finalize */ in uprv_decNumberSquareRoot()
3827 Int residue; /* rounding accumulator */ in decAddOp() local
3889 residue=0; /* clear accumulator */ in decAddOp()
3890 decCopyFit(res, rhs, set, &residue, status); /* copy (as needed) */ in decAddOp()
3918 decFinish(res, set, &residue, status); /* clean and finalize */ in decAddOp()
3925 residue=0; /* clear accumulator */ in decAddOp()
3926 decCopyFit(res, lhs, set, &residue, status); /* copy (as needed) */ in decAddOp()
3944 decFinish(res, set, &residue, status); /* clean and finalize */ in decAddOp()
4019 residue=1; /* residue for rounding */ in decAddOp()
4020 if (diffsign) residue=-residue; /* signs differ */ in decAddOp()
4022 decCopyFit(res, rhs, set, &residue, status); in decAddOp()
4030 decFinish(res, set, &residue, status); /* done */ in decAddOp()
4091 residue=0; /* clear accumulator */ in decAddOp()
4100 decSetCoeff(res, set, acc, res->digits, &residue, status); in decAddOp()
4122 decSetCoeff(res, set, acc, res->digits, &residue, status); in decAddOp()
4125 if (residue!=0) { in decAddOp()
4126 decApplyRound(res, set, residue, status); in decAddOp()
4127 residue=0; /* did what needed to be done */ in decAddOp()
4137 decFinish(res, set, &residue, status); in decAddOp()
4262 Int residue; /* for rounding */ in decDivideOp() local
4318 residue=0; in decDivideOp()
4321 decCopyFit(res, lhs, set, &residue, status); in decDivideOp()
4333 decFinish(res, set, &residue, status); in decDivideOp()
4361 residue=0; in decDivideOp()
4366 decFinalize(res, set, &residue, status); /* check exponent */ in decDivideOp()
4405 residue=0; in decDivideOp()
4406 decCopyFit(res, lhs, set, &residue, status); in decDivideOp()
4407 decFinish(res, set, &residue, status); in decDivideOp()
4629 residue=0; /* assume no residue */ in decDivideOp()
4632 if (*var1!=0 || var1units>1) residue=1; in decDivideOp()
4690 decFinish(res, set, &residue, status); /* might clamp */ in decDivideOp()
4795 decSetCoeff(res, set, accnext, accdigits, &residue, status); in decDivideOp()
4797 decFinish(res, set, &residue, status); /* final cleanup */ in decDivideOp()
4856 Int residue=0; /* rounding residue */ in decMultiplyOp() local
5146 decSetCoeff(res, set, acc, res->digits, &residue, status); in decMultiplyOp()
5147 decFinish(res, set, &residue, status); /* final cleanup */ in decMultiplyOp()
5246 Int residue; /* rounding residue */ in decExpOp() local
5499 residue=1; /* indicate dirt to right .. */ in decExpOp()
5500 if (ISZERO(a)) residue=0; /* .. unless underflowed to 0 */ in decExpOp()
5502 decCopyFit(res, a, &aset, &residue, status); /* copy & shorten */ in decExpOp()
5503 decFinish(res, set, &residue, status); /* cleanup/set flags */ in decExpOp()
5609 Int residue; /* rounding residue */ local
5723 residue=0; /* (no residue) */
5725 decCopyFit(b, rhs, &aset, &residue, &ignore); /* copy & shorten */
5814 residue=1; /* indicate dirt to right */
5815 if (ISZERO(a)) residue=0; /* .. unless underflowed to 0 */
5817 decCopyFit(res, a, &aset, &residue, status); /* copy & shorten */
5818 decFinish(res, set, &residue, status); /* cleanup/set flags */
5862 Int residue=0; /* rounding residue */ local
5943 decCopyFit(res, lhs, &workset, &residue, status); /* fit to result */
5944 decApplyRound(res, &workset, residue, status); /* .. and round */
5945 residue=0; /* [used] */
5983 decFinalize(res, set, &residue, status); /* set subnormal flags */
6134 Int residue=0; /* rounding accumulator */ local
6167 decCopyFit(res, choice, set, &residue, status);
6168 decFinish(res, set, &residue, status);
6832 Int residue=0; /* rounding accumulator */ local
6842 decCopyFit(res, dn, set, &residue, &newstatus);
6843 decApplyRound(res, set, residue, &newstatus);
6865 decContext *set, Int *residue, uInt *status) { argument
6868 decSetCoeff(dest, set, src->lsu, src->digits, residue, status);
6911 Int len, Int *residue, uInt *status) { argument
6932 if (*residue!=0) *status|=(DEC_Inexact | DEC_Rounded);
6939 if (*residue>1) *residue=1; /* previous residue now to right, so reduce */
6944 if (*residue<=0) { /* not already positive */
6947 *residue=1;
6951 if (*residue!=0) *status|=DEC_Inexact; /* record inexactitude */
6967 if (*up!=0) *residue=1;
6976 if (*up>half) *residue=7;
6977 else *residue+=5; /* add sticky bit */
6980 if (*up!=0) *residue=3; /* [else is 0, leave as sticky bit] */
7008 if (rem!=0) *residue=1;
7022 *residue+=resmap[discard1];
7055 if (*residue!=0) *status|=DEC_Inexact; /* record inexactitude */
7091 static void decApplyRound(decNumber *dn, decContext *set, Int residue, argument
7096 if (residue==0) return; /* nothing to apply */
7109 if (residue<0 && lsd5!=1) bump=-1;
7110 else if (residue>0 && lsd5==0) bump=1;
7116 if (residue<0) bump=-1;
7120 if (residue>5) bump=1;
7124 if (residue>5) bump=1; /* >0.5 goes up */
7125 else if (residue==5) { /* exactly 0.5000... */
7132 if (residue>=5) bump=1;
7136 if (residue>0) bump=1;
7143 if (residue<0) bump=-1;
7146 if (residue>0) bump=1;
7154 if (residue<0) bump=-1;
7157 if (residue>0) bump=1;
7260 static void decFinish(decNumber *dn, decContext *set, Int *residue, argument
7277 decFinalize(dn, set, residue, status);
7295 static void decFinalize(decNumber *dn, decContext *set, Int *residue, argument
7312 decSetSubnormal(dn, set, residue, status);
7324 if (*residue<0 && comp==0) { /* neg residue and dn==Nmin */
7325 decApplyRound(dn, set, *residue, status); /* might force down */
7326 decSetSubnormal(dn, set, residue, status);
7332 if (*residue!=0) decApplyRound(dn, set, *residue, status);
7449 static void decSetSubnormal(decNumber *dn, decContext *set, Int *residue, argument
7471 if (*residue!=0) {
7472 printf("++ Subnormal 0 residue %ld\n", (LI)*residue);
7499 decSetCoeff(dn, &workset, dn->lsu, dn->digits, residue, status);
7500 decApplyRound(dn, &workset, *residue, status);