Lines Matching refs:decNumber
242 #error decNumber.c: DECUSE64 must be 1 when DECDPUN>4
249 static decNumber * decAddOp(decNumber *, const decNumber *, const decNumber *,
252 static uInt decCheckMath(const decNumber *, decContext *, uInt *);
253 static void decApplyRound(decNumber *, decContext *, Int, uInt *);
254 static Int decCompare(const decNumber *lhs, const decNumber *rhs, Flag);
255 static decNumber * decCompareOp(decNumber *, const decNumber *,
256 const decNumber *, decContext *,
258 static void decCopyFit(decNumber *, const decNumber *, decContext *,
260 static decNumber * decDecap(decNumber *, Int);
261 static decNumber * decDivideOp(decNumber *, const decNumber *,
262 const decNumber *, decContext *, Flag, uInt *);
263 static decNumber * decExpOp(decNumber *, const decNumber *,
265 static void decFinalize(decNumber *, decContext *, Int *, uInt *);
267 static Int decGetInt(const decNumber *);
268 static decNumber * decLnOp(decNumber *, const decNumber *,
270 static decNumber * decMultiplyOp(decNumber *, const decNumber *,
271 const decNumber *, decContext *,
273 static decNumber * decNaNs(decNumber *, const decNumber *,
274 const decNumber *, decContext *, uInt *);
275 static decNumber * decQuantizeOp(decNumber *, const decNumber *,
276 const decNumber *, decContext *, Flag,
279 static void decSetCoeff(decNumber *, decContext *, const Unit *,
281 static void decSetMaxValue(decNumber *, decContext *);
282 static void decSetOverflow(decNumber *, decContext *, uInt *);
283 static void decSetSubnormal(decNumber *, decContext *, Int *, uInt *);
286 static void decStatus(decNumber *, uInt, decContext *);
287 static void decToString(const decNumber *, char[], Flag);
288 static decNumber * decTrim(decNumber *, decContext *, Flag, Flag, Int *);
297 static void decFinish(decNumber *, decContext *, Int *, uInt *);
298 static decNumber * decRoundOperand(const decNumber *, decContext *, uInt *);
338 #define DECUNRESU ((decNumber *)(void *)0xffffffff)
339 #define DECUNUSED ((const decNumber *)(void *)0xffffffff)
341 static Flag decCheckOperands(decNumber *, const decNumber *,
342 const decNumber *, decContext *);
343 static Flag decCheckNumber(const decNumber *);
344 static void decCheckInexact(const decNumber *, decContext *);
349 void decNumberShow(const decNumber *); /* displays the components of a number */
366 U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromInt32(decNumber *dn, Int in) { in uprv_decNumberFromInt32()
379 U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromUInt32(decNumber *dn, uInt uin) { in uprv_decNumberFromUInt32()
401 U_CAPI Int U_EXPORT2 uprv_decNumberToInt32(const decNumber *dn, decContext *set) { in uprv_decNumberToInt32()
437 U_CAPI uInt U_EXPORT2 uprv_decNumberToUInt32(const decNumber *dn, decContext *set) { in uprv_decNumberToUInt32()
480 U_CAPI char * U_EXPORT2 uprv_decNumberToString(const decNumber *dn, char *string){ in uprv_decNumberToString()
485 U_CAPI char * U_EXPORT2 uprv_decNumberToEngString(const decNumber *dn, char *string){ in uprv_decNumberToEngString()
510 U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char chars[], in uprv_decNumberFromString()
759 U_CAPI decNumber * U_EXPORT2 uprv_decNumberAbs(decNumber *res, const decNumber *rhs, in uprv_decNumberAbs()
761 decNumber dzero; /* for 0 */ in uprv_decNumberAbs()
791 U_CAPI decNumber * U_EXPORT2 uprv_decNumberAdd(decNumber *res, const decNumber *lhs, in uprv_decNumberAdd()
792 const decNumber *rhs, decContext *set) { in uprv_decNumberAdd()
817 U_CAPI decNumber * U_EXPORT2 uprv_decNumberAnd(decNumber *res, const decNumber *lhs, in uprv_decNumberAnd()
818 const decNumber *rhs, decContext *set) { in uprv_decNumberAnd()
885 U_CAPI decNumber * U_EXPORT2 uprv_decNumberCompare(decNumber *res, const decNumber *lhs, in uprv_decNumberCompare()
886 const decNumber *rhs, decContext *set) { in uprv_decNumberCompare()
905 U_CAPI decNumber * U_EXPORT2 uprv_decNumberCompareSignal(decNumber *res, const decNumber *lhs, in uprv_decNumberCompareSignal()
906 const decNumber *rhs, decContext *set) { in uprv_decNumberCompareSignal()
926 U_CAPI decNumber * U_EXPORT2 uprv_decNumberCompareTotal(decNumber *res, const decNumber *lhs, in uprv_decNumberCompareTotal()
927 const decNumber *rhs, decContext *set) { in uprv_decNumberCompareTotal()
947 U_CAPI decNumber * U_EXPORT2 uprv_decNumberCompareTotalMag(decNumber *res, const decNumber *lhs, in uprv_decNumberCompareTotalMag()
948 const decNumber *rhs, decContext *set) { in uprv_decNumberCompareTotalMag()
951 decNumber bufa[D2N(DECBUFFER+1)];/* +1 in case DECBUFFER=0 */ in uprv_decNumberCompareTotalMag()
952 decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */ in uprv_decNumberCompareTotalMag()
953 decNumber bufb[D2N(DECBUFFER+1)]; in uprv_decNumberCompareTotalMag()
954 decNumber *allocbufb=NULL; /* -> allocated bufb, iff allocated */ in uprv_decNumberCompareTotalMag()
955 decNumber *a, *b; /* temporary pointers */ in uprv_decNumberCompareTotalMag()
965 needbytes=sizeof(decNumber)+(D2U(lhs->digits)-1)*sizeof(Unit); in uprv_decNumberCompareTotalMag()
967 allocbufa=(decNumber *)malloc(needbytes); in uprv_decNumberCompareTotalMag()
979 needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); in uprv_decNumberCompareTotalMag()
981 allocbufb=(decNumber *)malloc(needbytes); in uprv_decNumberCompareTotalMag()
1012 U_CAPI decNumber * U_EXPORT2 uprv_decNumberDivide(decNumber *res, const decNumber *lhs, in uprv_decNumberDivide()
1013 const decNumber *rhs, decContext *set) { in uprv_decNumberDivide()
1035 U_CAPI decNumber * U_EXPORT2 uprv_decNumberDivideInteger(decNumber *res, const decNumber *lhs, in uprv_decNumberDivideInteger()
1036 const decNumber *rhs, decContext *set) { in uprv_decNumberDivideInteger()
1068 U_CAPI decNumber * U_EXPORT2 uprv_decNumberExp(decNumber *res, const decNumber *rhs, in uprv_decNumberExp()
1072 decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */ in uprv_decNumberExp()
1124 U_CAPI decNumber * U_EXPORT2 uprv_decNumberFMA(decNumber *res, const decNumber *lhs, in uprv_decNumberFMA()
1125 const decNumber *rhs, const decNumber *fhs, in uprv_decNumberFMA()
1130 decNumber bufa[D2N(DECBUFFER*2+1)]; in uprv_decNumberFMA()
1131 decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */ in uprv_decNumberFMA()
1132 decNumber *acc; /* accumulator pointer */ in uprv_decNumberFMA()
1133 decNumber dzero; /* work */ in uprv_decNumberFMA()
1158 needbytes=sizeof(decNumber)+(D2U(dcmul.digits)-1)*sizeof(Unit); in uprv_decNumberFMA()
1160 allocbufa=(decNumber *)malloc(needbytes); in uprv_decNumberFMA()
1215 U_CAPI decNumber * U_EXPORT2 uprv_decNumberInvert(decNumber *res, const decNumber *rhs, in uprv_decNumberInvert()
1288 U_CAPI decNumber * U_EXPORT2 uprv_decNumberLn(decNumber *res, const decNumber *rhs, in uprv_decNumberLn()
1292 decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */ in uprv_decNumberLn()
1354 U_CAPI decNumber * U_EXPORT2 uprv_decNumberLogB(decNumber *res, const decNumber *rhs, in uprv_decNumberLogB()
1414 U_CAPI decNumber * U_EXPORT2 uprv_decNumberLog10(decNumber *res, const decNumber *rhs, in uprv_decNumberLog10()
1423 decNumber bufa[D2N(DECBUFFER+2)]; in uprv_decNumberLog10()
1424 decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */ in uprv_decNumberLog10()
1425 decNumber *a=bufa; /* temporary a */ in uprv_decNumberLog10()
1426 decNumber bufb[D2N(DECBUFFER+2)]; in uprv_decNumberLog10()
1427 decNumber *allocbufb=NULL; /* -> allocated bufb, iff allocated */ in uprv_decNumberLog10()
1428 decNumber *b=bufb; /* temporary b */ in uprv_decNumberLog10()
1429 decNumber bufw[D2N(10)]; /* working 2-10 digit number */ in uprv_decNumberLog10()
1430 decNumber *w=bufw; /* .. */ in uprv_decNumberLog10()
1432 decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */ in uprv_decNumberLog10()
1491 needbytes=sizeof(decNumber)+(D2U(p)-1)*sizeof(Unit); in uprv_decNumberLog10()
1493 allocbufa=(decNumber *)malloc(needbytes); in uprv_decNumberLog10()
1514 needbytes=sizeof(decNumber)+(D2U(p)-1)*sizeof(Unit); in uprv_decNumberLog10()
1516 allocbufb=(decNumber *)malloc(needbytes); in uprv_decNumberLog10()
1565 U_CAPI decNumber * U_EXPORT2 uprv_decNumberMax(decNumber *res, const decNumber *lhs, in uprv_decNumberMax()
1566 const decNumber *rhs, decContext *set) { in uprv_decNumberMax()
1588 U_CAPI decNumber * U_EXPORT2 uprv_decNumberMaxMag(decNumber *res, const decNumber *lhs, in uprv_decNumberMaxMag()
1589 const decNumber *rhs, decContext *set) { in uprv_decNumberMaxMag()
1611 U_CAPI decNumber * U_EXPORT2 uprv_decNumberMin(decNumber *res, const decNumber *lhs, in uprv_decNumberMin()
1612 const decNumber *rhs, decContext *set) { in uprv_decNumberMin()
1634 U_CAPI decNumber * U_EXPORT2 uprv_decNumberMinMag(decNumber *res, const decNumber *lhs, in uprv_decNumberMinMag()
1635 const decNumber *rhs, decContext *set) { in uprv_decNumberMinMag()
1659 U_CAPI decNumber * U_EXPORT2 uprv_decNumberMinus(decNumber *res, const decNumber *rhs, in uprv_decNumberMinus()
1661 decNumber dzero; in uprv_decNumberMinus()
1689 U_CAPI decNumber * U_EXPORT2 uprv_decNumberNextMinus(decNumber *res, const decNumber *rhs, in uprv_decNumberNextMinus()
1691 decNumber dtiny; /* constant */ in uprv_decNumberNextMinus()
1725 U_CAPI decNumber * U_EXPORT2 uprv_decNumberNextPlus(decNumber *res, const decNumber *rhs, in uprv_decNumberNextPlus()
1727 decNumber dtiny; /* constant */ in uprv_decNumberNextPlus()
1765 U_CAPI decNumber * U_EXPORT2 uprv_decNumberNextToward(decNumber *res, const decNumber *lhs, in uprv_decNumberNextToward()
1766 const decNumber *rhs, decContext *set) { in uprv_decNumberNextToward()
1767 decNumber dtiny; /* constant */ in uprv_decNumberNextToward()
1833 U_CAPI decNumber * U_EXPORT2 uprv_decNumberOr(decNumber *res, const decNumber *lhs, in uprv_decNumberOr()
1834 const decNumber *rhs, decContext *set) { in uprv_decNumberOr()
1903 U_CAPI decNumber * U_EXPORT2 uprv_decNumberPlus(decNumber *res, const decNumber *rhs, in uprv_decNumberPlus()
1905 decNumber dzero; in uprv_decNumberPlus()
1933 U_CAPI decNumber * U_EXPORT2 uprv_decNumberMultiply(decNumber *res, const decNumber *lhs, in uprv_decNumberMultiply()
1934 const decNumber *rhs, decContext *set) { in uprv_decNumberMultiply()
1970 U_CAPI decNumber * U_EXPORT2 uprv_decNumberPower(decNumber *res, const decNumber *lhs, in uprv_decNumberPower()
1971 const decNumber *rhs, decContext *set) { in uprv_decNumberPower()
1973 decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */ in uprv_decNumberPower()
1974 decNumber *allocrhs=NULL; /* .., rhs */ in uprv_decNumberPower()
1976 decNumber *allocdac=NULL; /* -> allocated acc buffer, iff used */ in uprv_decNumberPower()
1977 decNumber *allocinv=NULL; /* -> allocated 1/x buffer, iff used */ in uprv_decNumberPower()
1993 decNumber dnOne; /* work value 1... */ in uprv_decNumberPower()
1995 decNumber dacbuff[D2N(DECBUFFER+9)]; in uprv_decNumberPower()
1996 decNumber *dac=dacbuff; /* -> result accumulator */ in uprv_decNumberPower()
1998 decNumber invbuff[D2N(DECBUFFER+9)]; in uprv_decNumberPower()
2161 needbytes=sizeof(decNumber)+(D2U(aset.digits)-1)*sizeof(Unit); in uprv_decNumberPower()
2164 allocdac=(decNumber *)malloc(needbytes); in uprv_decNumberPower()
2202 decNumber *inv=invbuff; /* asssume use fixed buffer */ in uprv_decNumberPower()
2211 allocinv=(decNumber *)malloc(needbytes); in uprv_decNumberPower()
2315 U_CAPI decNumber * U_EXPORT2 uprv_decNumberQuantize(decNumber *res, const decNumber *lhs, in uprv_decNumberQuantize()
2316 const decNumber *rhs, decContext *set) { in uprv_decNumberQuantize()
2335 U_CAPI decNumber * U_EXPORT2 uprv_decNumberNormalize(decNumber *res, const decNumber *rhs, in uprv_decNumberNormalize()
2340 U_CAPI decNumber * U_EXPORT2 uprv_decNumberReduce(decNumber *res, const decNumber *rhs, in uprv_decNumberReduce()
2343 decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */ in uprv_decNumberReduce()
2404 U_CAPI decNumber * U_EXPORT2 uprv_decNumberRescale(decNumber *res, const decNumber *lhs, in uprv_decNumberRescale()
2405 const decNumber *rhs, decContext *set) { in uprv_decNumberRescale()
2424 U_CAPI decNumber * U_EXPORT2 uprv_decNumberRemainder(decNumber *res, const decNumber *lhs, in uprv_decNumberRemainder()
2425 const decNumber *rhs, decContext *set) { in uprv_decNumberRemainder()
2447 U_CAPI decNumber * U_EXPORT2 uprv_decNumberRemainderNear(decNumber *res, const decNumber *lhs, in uprv_decNumberRemainderNear()
2448 const decNumber *rhs, decContext *set) { in uprv_decNumberRemainderNear()
2483 U_CAPI decNumber * U_EXPORT2 uprv_decNumberRotate(decNumber *res, const decNumber *lhs, in uprv_decNumberRotate()
2484 const decNumber *rhs, decContext *set) { in uprv_decNumberRotate()
2604 U_CAPI decNumber * U_EXPORT2 uprv_decNumberSameQuantum(decNumber *res, const decNumber *lhs, in uprv_decNumberSameQuantum()
2605 const decNumber *rhs) { in uprv_decNumberSameQuantum()
2639 U_CAPI decNumber * U_EXPORT2 uprv_decNumberScaleB(decNumber *res, const decNumber *lhs, in uprv_decNumberScaleB()
2640 const decNumber *rhs, decContext *set) { in uprv_decNumberScaleB()
2696 U_CAPI decNumber * U_EXPORT2 uprv_decNumberShift(decNumber *res, const decNumber *lhs, in uprv_decNumberShift()
2697 const decNumber *rhs, decContext *set) { in uprv_decNumberShift()
2829 U_CAPI decNumber * U_EXPORT2 uprv_decNumberSquareRoot(decNumber *res, const decNumber *rhs, in uprv_decNumberSquareRoot()
2832 decNumber dzero; /* used for constant zero */ in uprv_decNumberSquareRoot()
2844 decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */ in uprv_decNumberSquareRoot()
2847 decNumber buff[D2N(DECBUFFER+1)]; in uprv_decNumberSquareRoot()
2849 decNumber bufa[D2N(DECBUFFER+2)]; in uprv_decNumberSquareRoot()
2851 decNumber bufb[D2N(DECBUFFER+2)]; in uprv_decNumberSquareRoot()
2852 decNumber *allocbuff=NULL; /* -> allocated buff, iff allocated */ in uprv_decNumberSquareRoot()
2853 decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */ in uprv_decNumberSquareRoot()
2854 decNumber *allocbufb=NULL; /* -> allocated bufb, iff allocated */ in uprv_decNumberSquareRoot()
2855 decNumber *f=buff; /* reduced fraction */ in uprv_decNumberSquareRoot()
2856 decNumber *a=bufa; /* approximation to result */ in uprv_decNumberSquareRoot()
2857 decNumber *b=bufb; /* intermediate result */ in uprv_decNumberSquareRoot()
2859 decNumber buft[D2N(3)]; in uprv_decNumberSquareRoot()
2860 decNumber *t=buft; /* up-to-3-digit constant or work */ in uprv_decNumberSquareRoot()
2922 needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); in uprv_decNumberSquareRoot()
2924 allocbuff=(decNumber *)malloc(needbytes); in uprv_decNumberSquareRoot()
2931 needbytes=sizeof(decNumber)+(D2U(maxp)-1)*sizeof(Unit); in uprv_decNumberSquareRoot()
2933 allocbufa=(decNumber *)malloc(needbytes); in uprv_decNumberSquareRoot()
2934 allocbufb=(decNumber *)malloc(needbytes); in uprv_decNumberSquareRoot()
3174 U_CAPI decNumber * U_EXPORT2 uprv_decNumberSubtract(decNumber *res, const decNumber *lhs, in uprv_decNumberSubtract()
3175 const decNumber *rhs, decContext *set) { in uprv_decNumberSubtract()
3207 U_CAPI decNumber * U_EXPORT2 uprv_decNumberToIntegralExact(decNumber *res, const decNumber *rhs, in uprv_decNumberToIntegralExact()
3209 decNumber dn; in uprv_decNumberToIntegralExact()
3237 U_CAPI decNumber * U_EXPORT2 uprv_decNumberToIntegralValue(decNumber *res, const decNumber *rhs, in uprv_decNumberToIntegralValue()
3263 U_CAPI decNumber * U_EXPORT2 uprv_decNumberXor(decNumber *res, const decNumber *lhs, in uprv_decNumberXor()
3264 const decNumber *rhs, decContext *set) { in uprv_decNumberXor()
3328 enum decClass uprv_decNumberClass(const decNumber *dn, decContext *set) { in uprv_decNumberClass()
3381 U_CAPI decNumber * U_EXPORT2 uprv_decNumberCopy(decNumber *dest, const decNumber *src) { in uprv_decNumberCopy()
3421 U_CAPI decNumber * U_EXPORT2 uprv_decNumberCopyAbs(decNumber *res, const decNumber *rhs) { in uprv_decNumberCopyAbs()
3442 U_CAPI decNumber * U_EXPORT2 uprv_decNumberCopyNegate(decNumber *res, const decNumber *rhs) { in uprv_decNumberCopyNegate()
3463 U_CAPI decNumber * U_EXPORT2 uprv_decNumberCopySign(decNumber *res, const decNumber *lhs, in uprv_decNumberCopySign()
3464 const decNumber *rhs) { in uprv_decNumberCopySign()
3486 U_CAPI uByte * U_EXPORT2 uprv_decNumberGetBCD(const decNumber *dn, uByte *bcd) { in uprv_decNumberGetBCD()
3520 U_CAPI decNumber * U_EXPORT2 uprv_decNumberSetBCD(decNumber *dn, const uByte *bcd, uInt n) { in uprv_decNumberSetBCD()
3545 Int uprv_decNumberIsNormal(const decNumber *dn, decContext *set) { in uprv_decNumberIsNormal()
3565 Int uprv_decNumberIsSubnormal(const decNumber *dn, decContext *set) { in uprv_decNumberIsSubnormal()
3589 U_CAPI decNumber * U_EXPORT2 uprv_decNumberTrim(decNumber *dn) { in uprv_decNumberTrim()
3617 U_CAPI decNumber * U_EXPORT2 uprv_decNumberZero(decNumber *dn) { in uprv_decNumberZero()
3650 static void decToString(const decNumber *dn, char *string, Flag eng) { in decToString()
3832 static decNumber * decAddOp(decNumber *res, const decNumber *lhs, in decAddOp()
3833 const decNumber *rhs, decContext *set, in decAddOp()
3836 decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */ in decAddOp()
3837 decNumber *allocrhs=NULL; /* .., rhs */ in decAddOp()
4020 const decNumber *t; in decAddOp()
4248 static decNumber * decDivideOp(decNumber *res, in decDivideOp()
4249 const decNumber *lhs, const decNumber *rhs, in decDivideOp()
4252 decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */ in decDivideOp()
4253 decNumber *allocrhs=NULL; /* .., rhs */ in decDivideOp()
4868 static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, in decMultiplyOp()
4869 const decNumber *rhs, decContext *set, in decMultiplyOp()
4925 decNumber *alloclhs=NULL; /* -> allocated buffer, iff allocated */ in decMultiplyOp()
4926 decNumber *allocrhs=NULL; /* -> allocated buffer, iff allocated */ in decMultiplyOp()
4955 const decNumber *hold=lhs; in decMultiplyOp()
5262 decNumber * decExpOp(decNumber *res, const decNumber *rhs, in decExpOp()
5269 const decNumber *x=rhs; /* (may point to safe copy later) */ in decExpOp()
5276 decNumber bufr[D2N(DECBUFFER*2+1)]; in decExpOp()
5277 decNumber *allocrhs=NULL; /* non-NULL if rhs buffer allocated */ in decExpOp()
5284 decNumber buft[D2N(DECBUFFER*2+9+1)]; in decExpOp()
5285 decNumber *allocbuft=NULL; /* -> allocated buft, iff allocated */ in decExpOp()
5286 decNumber *t=buft; /* term */ in decExpOp()
5288 decNumber bufa[D2N(DECBUFFER*4+18+1)]; in decExpOp()
5289 decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */ in decExpOp()
5290 decNumber *a=bufa; /* accumulator */ in decExpOp()
5293 decNumber bufd[D2N(16)]; in decExpOp()
5294 decNumber *d=bufd; /* divisor */ in decExpOp()
5295 decNumber numone; /* constant 1 */ in decExpOp()
5395 decNumber *newrhs=bufr; /* assume will fit on stack */ in decExpOp()
5396 needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); in decExpOp()
5398 allocrhs=(decNumber *)malloc(needbytes); in decExpOp()
5428 needbytes=sizeof(decNumber)+(D2U(p*2)-1)*sizeof(Unit); in decExpOp()
5430 allocbufa=(decNumber *)malloc(needbytes); in decExpOp()
5440 needbytes=sizeof(decNumber)+(D2U(p+2)-1)*sizeof(Unit); in decExpOp()
5442 allocbuft=(decNumber *)malloc(needbytes); in decExpOp()
5626 decNumber * decLnOp(decNumber *res, const decNumber *rhs,
5638 decNumber bufa[D2N(DECBUFFER+12)];
5639 decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */
5640 decNumber *a=bufa; /* accumulator/work */
5641 decNumber bufb[D2N(DECBUFFER*2+2)];
5642 decNumber *allocbufb=NULL; /* -> allocated bufa, iff allocated */
5643 decNumber *b=bufb; /* adjustment/work */
5645 decNumber numone; /* constant 1 */
5646 decNumber cmp; /* work */
5709 needbytes=sizeof(decNumber)+(D2U(MAXI(p,16))-1)*sizeof(Unit);
5711 allocbufa=(decNumber *)malloc(needbytes);
5718 needbytes=sizeof(decNumber)+(D2U(MAXI(pp,16))-1)*sizeof(Unit);
5720 allocbufb=(decNumber *)malloc(needbytes);
5873 static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs,
5874 const decNumber *rhs, decContext *set,
5877 decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */
5878 decNumber *allocrhs=NULL; /* .., rhs */
5880 const decNumber *inrhs=rhs; /* save original rhs */
6046 static decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
6047 const decNumber *rhs, decContext *set,
6050 decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */
6051 decNumber *allocrhs=NULL; /* .., rhs */
6157 const decNumber *choice;
6211 static Int decCompare(const decNumber *lhs, const decNumber *rhs,
6246 const decNumber *temp=lhs;
6633 static decNumber * decTrim(decNumber *dn, decContext *set, Flag all,
6849 static decNumber *decRoundOperand(const decNumber *dn, decContext *set,
6851 decNumber *res; /* result structure */
6857 res=(decNumber *)malloc(sizeof(decNumber)
6885 static void decCopyFit(decNumber *dest, const decNumber *src,
6931 static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
7113 static void decApplyRound(decNumber *dn, decContext *set, Int residue,
7282 static void decFinish(decNumber *dn, decContext *set, Int *residue,
7317 static void decFinalize(decNumber *dn, decContext *set, Int *residue,
7330 decNumber nmin;
7391 static void decSetOverflow(decNumber *dn, decContext *set, uInt *status) {
7437 static void decSetMaxValue(decNumber *dn, decContext *set) {
7471 static void decSetSubnormal(decNumber *dn, decContext *set, Int *residue,
7557 static uInt decCheckMath(const decNumber *rhs, decContext *set,
7585 static Int decGetInt(const decNumber *dn) {
7674 static decNumber *decDecap(decNumber *dn, Int drop) {
7733 static decNumber * decNaNs(decNumber *res, const decNumber *lhs,
7734 const decNumber *rhs, decContext *set,
7784 static void decStatus(decNumber *dn, uInt status, decContext *set) {
7856 void uprv_decNumberShow(const decNumber *dn) {
7953 static Flag decCheckOperands(decNumber *res, const decNumber *lhs,
7954 const decNumber *rhs, decContext *set) {
7999 static Flag decCheckNumber(const decNumber *dn) {
8100 static void decCheckInexact(const decNumber *dn, decContext *set) {