Lines Matching refs:Unit

192 static Unit one[] = { 1 };	/* Unit array of 1, used for incrementing */
230 static Int decGetDigits (const Unit *, Int);
241 static void decSetCoeff (decNumber *, decContext *, const Unit *,
245 static Int decShiftToLeast (Unit *, Int, Int);
246 static Int decShiftToMost (Unit *, Int, Int);
251 static Int decUnitAddSub (const Unit *, Int, const Unit *, Int, Int, Unit *, Int);
252 static Int decUnitCompare (const Unit *, Int, const Unit *, Int, Int);
296 static void decDumpAr (char, const Unit *, Int);
356 Unit *res; /* where result will be built */ in decNumberFromString()
357 Unit resbuff[D2U (DECBUFFER + 1)]; /* local buffer in case need temporary */ in decNumberFromString()
358 Unit *allocres = NULL; /* -> allocated result, iff allocated */ in decNumberFromString()
366 Unit *up; /* .. */ in decNumberFromString()
563 if (need * sizeof (Unit) > sizeof (resbuff)) in decNumberFromString()
565 allocres = (Unit *) malloc (need * sizeof (Unit)); in decNumberFromString()
591 *up = (Unit) (X10 (*up) + (Int) * c - (Int) '0'); in decNumberFromString()
608 *up = (Unit) ((Int) * c - (Int) '0'); in decNumberFromString()
997 uByte dacbuff[sizeof (decNumber) + D2U (DECBUFFER + 9) * sizeof (Unit)]; in decNumberPower()
999 uByte lhsbuff[sizeof (decNumber) + D2U (DECBUFFER + 9) * sizeof (Unit)]; in decNumberPower()
1096 sizeof (decNumber) + (D2U (workset.digits) - 1) * sizeof (Unit); in decNumberPower()
1361 Unit ret = 0; /* return value */ in decNumberSameQuantum()
1469 uByte buff[sizeof (decNumber) + (D2U (DECBUFFER + 1) - 1) * sizeof (Unit)]; in decNumberSquareRoot()
1471 uByte bufa[sizeof (decNumber) + (D2U (DECBUFFER + 2) - 1) * sizeof (Unit)]; in decNumberSquareRoot()
1473 uByte bufb[sizeof (decNumber) + (D2U (DECBUFFER + 2) - 1) * sizeof (Unit)]; in decNumberSquareRoot()
1481 uByte buft[sizeof (decNumber) + (D2U (3) - 1) * sizeof (Unit)]; in decNumberSquareRoot()
1550 sizeof (decNumber) + (D2U (rhs->digits) - 1) * sizeof (Unit); in decNumberSquareRoot()
1562 needbytes = sizeof (decNumber) + (D2U (maxp) - 1) * sizeof (Unit); in decNumberSquareRoot()
1896 Unit *d; /* work */ in decNumberCopy()
1897 const Unit *s, *smsup; /* work */ in decNumberCopy()
2010 const Unit *up = dn->lsu + D2U (dn->digits) - 1; /* -> msu [input pointer] */ in decToString()
2241 Unit *acc; /* accumulator for result */ in decAddOp()
2242 Unit accbuff[D2U (DECBUFFER + 1)]; /* local buffer [+1 is for possible */ in decAddOp()
2244 Unit *allocacc = NULL; /* -> allocated acc buffer, iff allocated */ in decAddOp()
2414 *res->lsu = (Unit) partial; /* [copy could have overwritten RHS] */ in decAddOp()
2426 *res->lsu = (Unit) partial; in decAddOp()
2516 if (need * sizeof (Unit) > sizeof (accbuff)) in decAddOp()
2518 allocacc = (Unit *) malloc (need * sizeof (Unit)); in decAddOp()
2713 Unit accbuff[D2U (DECBUFFER + DECDPUN)]; /* local buffer */ in decDivideOp()
2714 Unit *acc = accbuff; /* -> accumulator array for result */ in decDivideOp()
2715 Unit *allocacc = NULL; /* -> allocated buffer, iff allocated */ in decDivideOp()
2716 Unit *accnext; /* -> where next digit will go */ in decDivideOp()
2721 Unit varbuff[D2U (DECBUFFER * 2 + DECDPUN) * sizeof (Unit)]; /* buffer for var1 */ in decDivideOp()
2722 Unit *var1 = varbuff; /* -> var1 array for long subtraction */ in decDivideOp()
2723 Unit *varalloc = NULL; /* -> allocated buffer, iff used */ in decDivideOp()
2725 const Unit *var2; /* -> var2 array */ in decDivideOp()
2730 Unit *msu1; /* -> msu of each var */ in decDivideOp()
2731 const Unit *msu2; /* -> msu of each var */ in decDivideOp()
2736 Unit thisunit; /* current unit being accumulated */ in decDivideOp()
2743 Unit *target; /* work */ in decDivideOp()
2744 const Unit *source; /* work */ in decDivideOp()
2931 if (acclength * sizeof (Unit) > sizeof (accbuff)) in decDivideOp()
2933 allocacc = (Unit *) malloc (acclength * sizeof (Unit)); in decDivideOp()
2960 if ((var1units + 1) * sizeof (Unit) > sizeof (varbuff)) in decDivideOp()
2962 varalloc = (Unit *) malloc ((var1units + 1) * sizeof (Unit)); in decDivideOp()
3020 Unit *u; in decDivideOp()
3067 Unit *pv1, v2; /* units to compare */ in decDivideOp()
3068 const Unit *pv2; /* units to compare */ in decDivideOp()
3112 thisunit = (Unit) (thisunit + mult); /* accumulate */ in decDivideOp()
3198 Unit lsu = *accnext; in decDivideOp()
3242 Unit *quotlsu; /* for save */ in decDivideOp()
3292 Unit *up; /* .. */ in decDivideOp()
3435 Unit accbuff[D2U (DECBUFFER * 2 + 1)]; /* local buffer (+1 in case DECBUFFER==0) */ in decMultiplyOp()
3436 Unit *acc = accbuff; /* -> accumulator array for exact result */ in decMultiplyOp()
3437 Unit *allocacc = NULL; /* -> allocated buffer, iff allocated */ in decMultiplyOp()
3438 const Unit *mer, *mermsup; /* work */ in decMultiplyOp()
3512 if (need * sizeof (Unit) > sizeof (accbuff)) in decMultiplyOp()
3514 allocacc = (Unit *) malloc (need * sizeof (Unit)); in decMultiplyOp()
4028 decUnitCompare (const Unit * a, Int alength, const Unit * b, Int blength, Int exp) in decUnitCompare()
4030 Unit *acc; /* accumulator for result */ in decUnitCompare()
4031 Unit accbuff[D2U (DECBUFFER + 1)]; /* local buffer */ in decUnitCompare()
4032 Unit *allocacc = NULL; /* -> allocated acc buffer, iff allocated */ in decUnitCompare()
4034 const Unit *l, *r, *u; /* work */ in decUnitCompare()
4071 if (need * sizeof (Unit) > sizeof (accbuff)) in decUnitCompare()
4073 allocacc = (Unit *) malloc (need * sizeof (Unit)); in decUnitCompare()
4148 decUnitAddSub (const Unit * a, Int alength, in decUnitAddSub()
4149 const Unit * b, Int blength, Int bshift, Unit * c, Int m) in decUnitAddSub()
4151 const Unit *alsu = a; /* A lsu [need to remember it] */ in decUnitAddSub()
4152 Unit *clsu = c; /* C ditto */ in decUnitAddSub()
4153 Unit *minC; /* low water mark for C */ in decUnitAddSub()
4154 Unit *maxC; /* high water mark for C */ in decUnitAddSub()
4188 Unit *hold = minC; in decUnitAddSub()
4206 *c = (Unit) carry; in decUnitAddSub()
4215 *c = (Unit) (carry - est * (DECDPUNMAX + 1)); /* remainder */ in decUnitAddSub()
4226 *c = (Unit) (carry - est * (DECDPUNMAX + 1)); in decUnitAddSub()
4235 *c = (Unit) (carry - (DECDPUNMAX + 1)); /* [helps additions] */ in decUnitAddSub()
4241 *c = (Unit) (carry % (DECDPUNMAX + 1)); in decUnitAddSub()
4247 *c = (Unit) (carry % (DECDPUNMAX + 1)); in decUnitAddSub()
4271 *c = (Unit) carry; in decUnitAddSub()
4281 *c = (Unit) (carry - est * (DECDPUNMAX + 1)); /* remainder */ in decUnitAddSub()
4292 *c = (Unit) (carry - est * (DECDPUNMAX + 1)); in decUnitAddSub()
4301 *c = (Unit) (carry - (DECDPUNMAX + 1)); in decUnitAddSub()
4308 *c = (Unit) (carry % (DECDPUNMAX + 1)); in decUnitAddSub()
4314 *c = (Unit) (carry % (DECDPUNMAX + 1)); in decUnitAddSub()
4325 *c = (Unit) carry; /* place as new unit */ in decUnitAddSub()
4336 *c = (Unit) add; in decUnitAddSub()
4351 *c = (Unit) (add - carry - 1); in decUnitAddSub()
4373 Unit *up; /* -> current Unit */ in decTrim()
4448 decShiftToMost (Unit * uar, Int digits, Int shift) in decShiftToMost()
4450 Unit *target, *source, *first; /* work */ in decShiftToMost()
4459 *uar = (Unit) (*uar * powers[shift]); in decShiftToMost()
4481 *target = (Unit) next; /* write to target iff valid */ in decShiftToMost()
4487 *target = (Unit) next; in decShiftToMost()
4507 decShiftToLeast (Unit * uar, Int units, Int shift) in decShiftToLeast()
4509 Unit *target, *up; /* work */ in decShiftToLeast()
4534 *target = (Unit) quot; in decShiftToLeast()
4547 *target = (Unit) (*target + rem * powers[DECDPUN - cut]); in decShiftToLeast()
4584 + (D2U (set->digits) - 1) * sizeof (Unit)); in decRoundOperand()
4662 decSetCoeff (decNumber * dn, decContext * set, const Unit * lsu, in decSetCoeff()
4669 Unit *target; /* work */ in decSetCoeff()
4670 const Unit *up; /* work */ in decSetCoeff()
4811 *target = (Unit) quot; in decSetCoeff()
4824 *target = (Unit) (*target + rem * powers[DECDPUN - cut]); in decSetCoeff()
4981 Unit *up; /* work */ in decApplyRound()
4991 *up = (Unit) powers[count - 1]; /* here 999 -> 100 etc. */ in decApplyRound()
5012 Unit *up, *sup; /* work */ in decApplyRound()
5023 *up = (Unit) powers[count] - 1; /* here 100 in msu -> 999 */ in decApplyRound()
5026 *up = (Unit) powers[DECDPUN] - 1; in decApplyRound()
5040 *sup = (Unit) powers[count - 1] - 1; /* here 999.. in msu -> 99.. */ in decApplyRound()
5225 Unit *up; /* work */ in decSetOverflow()
5235 *up = (Unit) (powers[count] - 1); in decSetOverflow()
5370 const Unit *up; /* work */
5563 decGetDigits (const Unit * uar, Int len)
5565 const Unit *up = uar + len - 1; /* -> msu */
5606 const Unit *up; /* work */
5672 decDumpAr (char name, const Unit * ar, Int len)
5768 const Unit *up; /* work */