rhs 225 src/decNumber/decNumber.c static Int decCompare(const decNumber *lhs, const decNumber *rhs, Flag); rhs 274 src/decNumber/decNumber.c #define SPECIALARG (rhs->bits & DECSPECIAL) rhs 275 src/decNumber/decNumber.c #define SPECIALARGS ((lhs->bits | rhs->bits) & DECSPECIAL) rhs 671 src/decNumber/decNumber.c decNumber * decNumberAbs(decNumber *res, const decNumber *rhs, rhs 677 src/decNumber/decNumber.c dzero.exponent=rhs->exponent; // [no coefficient expansion] rhs 678 src/decNumber/decNumber.c decAddOp(res, &dzero, rhs, set, (uByte)(rhs->bits & DECNEG), &status); rhs 697 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 699 src/decNumber/decNumber.c decAddOp(res, lhs, rhs, set, 0, &status); rhs 720 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 727 src/decNumber/decNumber.c || rhs->exponent!=0 || decNumberIsSpecial(rhs) || decNumberIsNegative(rhs)) { rhs 734 src/decNumber/decNumber.c ub=rhs->lsu; // .. rhs 737 src/decNumber/decNumber.c msub=ub+D2U(rhs->digits)-1; // -> msu of rhs rhs 785 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 787 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPARE, &status); rhs 805 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 807 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPSIG, &status); rhs 826 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 828 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPTOTAL, &status); rhs 847 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 872 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) { // rhs<0 rhs 874 src/decNumber/decNumber.c needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); rhs 882 src/decNumber/decNumber.c decNumberCopy(b, rhs); // copy content rhs 884 src/decNumber/decNumber.c rhs=b; // use copy from here on rhs 886 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPTOTAL, &status); rhs 908 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 910 src/decNumber/decNumber.c decDivideOp(res, lhs, rhs, set, DIVIDE, &status); rhs 928 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 930 src/decNumber/decNumber.c decDivideOp(res, lhs, rhs, set, DIVIDEINT, &status); rhs 960 src/decNumber/decNumber.c decNumber * decNumberExp(decNumber *res, const decNumber *rhs, rhs 971 src/decNumber/decNumber.c if (!decCheckMath(rhs, set, &status)) do { // protect allocation rhs 975 src/decNumber/decNumber.c if (rhs->digits>set->digits) { rhs 976 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, &status); rhs 978 src/decNumber/decNumber.c rhs=allocrhs; rhs 982 src/decNumber/decNumber.c decExpOp(res, rhs, set, &status); rhs 1010 src/decNumber/decNumber.c const decNumber *rhs, const decNumber *fhs, rhs 1028 src/decNumber/decNumber.c || (!decNumberIsSpecial(rhs) && decCheckMath(rhs, set, &status)) rhs 1032 src/decNumber/decNumber.c dcmul.digits=lhs->digits+rhs->digits; // just enough rhs 1048 src/decNumber/decNumber.c decMultiplyOp(acc, lhs, rhs, &dcmul, &status); rhs 1087 src/decNumber/decNumber.c decNumber * decNumberInvert(decNumber *res, const decNumber *rhs, rhs 1093 src/decNumber/decNumber.c if (rhs->exponent!=0 || decNumberIsSpecial(rhs) || decNumberIsNegative(rhs)) { rhs 1098 src/decNumber/decNumber.c ua=rhs->lsu; // bottom-up rhs 1100 src/decNumber/decNumber.c msua=ua+D2U(rhs->digits)-1; // -> msu of rhs rhs 1157 src/decNumber/decNumber.c decNumber * decNumberLn(decNumber *res, const decNumber *rhs, rhs 1166 src/decNumber/decNumber.c if (!decCheckMath(rhs, set, &status)) do { // protect allocation rhs 1170 src/decNumber/decNumber.c if (rhs->digits>set->digits) { rhs 1171 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, &status); rhs 1173 src/decNumber/decNumber.c rhs=allocrhs; rhs 1176 src/decNumber/decNumber.c if (ISZERO(rhs)) { // +/- zeros -> error rhs 1181 src/decNumber/decNumber.c decLnOp(res, rhs, set, &status); rhs 1216 src/decNumber/decNumber.c decNumber * decNumberLogB(decNumber *res, const decNumber *rhs, rhs 1221 src/decNumber/decNumber.c if (decNumberIsNaN(rhs)) decNaNs(res, rhs, NULL, set, &status); rhs 1222 src/decNumber/decNumber.c else if (decNumberIsInfinite(rhs)) decNumberCopyAbs(res, rhs); rhs 1223 src/decNumber/decNumber.c else if (decNumberIsZero(rhs)) { rhs 1229 src/decNumber/decNumber.c Int ae=rhs->exponent+rhs->digits-1; // adjusted exponent rhs 1274 src/decNumber/decNumber.c decNumber * decNumberLog10(decNumber *res, const decNumber *rhs, rhs 1298 src/decNumber/decNumber.c if (rhs->bits&(DECNAN|DECSNAN)) { rhs 1299 src/decNumber/decNumber.c decNumberPlus(res, rhs, set); rhs 1305 src/decNumber/decNumber.c if (!decCheckMath(rhs, set, &status)) do { // protect malloc rhs 1309 src/decNumber/decNumber.c if (rhs->digits>set->digits) { rhs 1310 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, &status); rhs 1312 src/decNumber/decNumber.c rhs=allocrhs; rhs 1315 src/decNumber/decNumber.c if (ISZERO(rhs)) { // +/- zeros -> error rhs 1324 src/decNumber/decNumber.c if (!(rhs->bits&(DECNEG|DECSPECIAL)) && !ISZERO(rhs)) { rhs 1330 src/decNumber/decNumber.c decCopyFit(w, rhs, &aset, &residue, ©stat); // copy & shorten rhs 1352 src/decNumber/decNumber.c p=(rhs->digits+t>set->digits?rhs->digits+t:set->digits)+3; rhs 1365 src/decNumber/decNumber.c decLnOp(a, rhs, &aset, &status); // a=ln(rhs) rhs 1422 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 1424 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPMAX, &status); rhs 1442 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 1444 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPMAXMAG, &status); rhs 1462 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 1464 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPMIN, &status); rhs 1482 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 1484 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPMINMAG, &status); rhs 1503 src/decNumber/decNumber.c decNumber * decNumberMinus(decNumber *res, const decNumber *rhs, rhs 1509 src/decNumber/decNumber.c dzero.exponent=rhs->exponent; // [no coefficient expansion] rhs 1510 src/decNumber/decNumber.c decAddOp(res, &dzero, rhs, set, DECNEG, &status); rhs 1526 src/decNumber/decNumber.c decNumber * decNumberNextMinus(decNumber *res, const decNumber *rhs, rhs 1533 src/decNumber/decNumber.c if ((rhs->bits&(DECINF|DECNEG))==DECINF) { rhs 1541 src/decNumber/decNumber.c decNumberPlus(res, rhs, &workset); rhs 1550 src/decNumber/decNumber.c decAddOp(res, rhs, &dtiny, &workset, DECNEG, &status); rhs 1567 src/decNumber/decNumber.c decNumber * decNumberNextPlus(decNumber *res, const decNumber *rhs, rhs 1574 src/decNumber/decNumber.c if ((rhs->bits&(DECINF|DECNEG))==(DECINF|DECNEG)) { rhs 1583 src/decNumber/decNumber.c decNumberPlus(res, rhs, &workset); rhs 1592 src/decNumber/decNumber.c decAddOp(res, rhs, &dtiny, &workset, 0, &status); rhs 1613 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 1619 src/decNumber/decNumber.c if (decNumberIsNaN(lhs) || decNumberIsNaN(rhs)) { rhs 1620 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); rhs 1623 src/decNumber/decNumber.c result=decCompare(lhs, rhs, 0); // sign matters rhs 1626 src/decNumber/decNumber.c if (result==0) decNumberCopySign(res, lhs, rhs); // easy rhs 1678 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 1685 src/decNumber/decNumber.c || rhs->exponent!=0 || decNumberIsSpecial(rhs) || decNumberIsNegative(rhs)) { rhs 1691 src/decNumber/decNumber.c ub=rhs->lsu; // .. rhs 1694 src/decNumber/decNumber.c msub=ub+D2U(rhs->digits)-1; // -> msu of rhs rhs 1744 src/decNumber/decNumber.c decNumber * decNumberPlus(decNumber *res, const decNumber *rhs, rhs 1750 src/decNumber/decNumber.c dzero.exponent=rhs->exponent; // [no coefficient expansion] rhs 1751 src/decNumber/decNumber.c decAddOp(res, &dzero, rhs, set, 0, &status); rhs 1769 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 1771 src/decNumber/decNumber.c decMultiplyOp(res, lhs, rhs, set, &status); rhs 1803 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 1840 src/decNumber/decNumber.c if (rhs->digits>reqdigits) { rhs 1841 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, &status); rhs 1843 src/decNumber/decNumber.c rhs=allocrhs; rhs 1851 src/decNumber/decNumber.c if (decNumberIsNaN(lhs) || decNumberIsNaN(rhs)) { // NaNs rhs 1852 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); rhs 1854 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs)) { // rhs Infinity rhs 1855 src/decNumber/decNumber.c Flag rhsneg=rhs->bits&DECNEG; // save rhs sign rhs 1884 src/decNumber/decNumber.c n=decGetInt(rhs); rhs 1897 src/decNumber/decNumber.c uByte rbits=rhs->bits; // save rhs 1923 src/decNumber/decNumber.c uByte rbits=rhs->bits; // save rhs 1947 src/decNumber/decNumber.c || decCheckMath(rhs, set, &status)) break; // variable status rhs 1979 src/decNumber/decNumber.c aset.digits=reqdigits+(rhs->digits+rhs->exponent)+2; rhs 2020 src/decNumber/decNumber.c decMultiplyOp(dac, dac, rhs, &aset, &status); // dac=dac*rhs rhs 2032 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) { // was a **-n [hence digits>0] rhs 2086 src/decNumber/decNumber.c if (!set->extended && decNumberIsNegative(rhs)) { rhs 2105 src/decNumber/decNumber.c decNumberIsNegative(rhs)) { // was a **-n [hence digits>0] rhs 2149 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 2151 src/decNumber/decNumber.c decQuantizeOp(res, lhs, rhs, set, 1, &status); rhs 2168 src/decNumber/decNumber.c decNumber * decNumberNormalize(decNumber *res, const decNumber *rhs, rhs 2170 src/decNumber/decNumber.c return decNumberReduce(res, rhs, set); rhs 2173 src/decNumber/decNumber.c decNumber * decNumberReduce(decNumber *res, const decNumber *rhs, rhs 2186 src/decNumber/decNumber.c if (rhs->digits>set->digits) { rhs 2187 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, &status); rhs 2189 src/decNumber/decNumber.c rhs=allocrhs; rhs 2196 src/decNumber/decNumber.c if (decNumberIsNaN(rhs)) { rhs 2197 src/decNumber/decNumber.c decNaNs(res, rhs, NULL, set, &status); rhs 2202 src/decNumber/decNumber.c decCopyFit(res, rhs, set, &residue, &status); // copy & round rhs 2234 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 2236 src/decNumber/decNumber.c decQuantizeOp(res, lhs, rhs, set, 0, &status); rhs 2254 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 2256 src/decNumber/decNumber.c decDivideOp(res, lhs, rhs, set, REMAINDER, &status); rhs 2274 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 2276 src/decNumber/decNumber.c decDivideOp(res, lhs, rhs, set, REMNEAR, &status); rhs 2307 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 2312 src/decNumber/decNumber.c if (decNumberIsNaN(lhs) || decNumberIsNaN(rhs)) rhs 2313 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); rhs 2315 src/decNumber/decNumber.c else if (decNumberIsInfinite(rhs) || rhs->exponent!=0) rhs 2318 src/decNumber/decNumber.c rotate=decGetInt(rhs); // [cannot fail] rhs 2425 src/decNumber/decNumber.c const decNumber *rhs) { rhs 2429 src/decNumber/decNumber.c if (decNumberIsNaN(lhs) && decNumberIsNaN(rhs)) ret=1; rhs 2430 src/decNumber/decNumber.c else if (decNumberIsInfinite(lhs) && decNumberIsInfinite(rhs)) ret=1; rhs 2433 src/decNumber/decNumber.c else if (lhs->exponent==rhs->exponent) ret=1; rhs 2456 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 2462 src/decNumber/decNumber.c if (decNumberIsNaN(lhs) || decNumberIsNaN(rhs)) rhs 2463 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); rhs 2465 src/decNumber/decNumber.c else if (decNumberIsInfinite(rhs) || rhs->exponent!=0) rhs 2469 src/decNumber/decNumber.c reqexp=decGetInt(rhs); // [cannot fail] rhs 2519 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 2524 src/decNumber/decNumber.c if (decNumberIsNaN(lhs) || decNumberIsNaN(rhs)) rhs 2525 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); rhs 2527 src/decNumber/decNumber.c else if (decNumberIsInfinite(rhs) || rhs->exponent!=0) rhs 2530 src/decNumber/decNumber.c shift=decGetInt(rhs); // [cannot fail] rhs 2643 src/decNumber/decNumber.c decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, rhs 2680 src/decNumber/decNumber.c if (rhs->digits>set->digits) { rhs 2681 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, &status); rhs 2685 src/decNumber/decNumber.c rhs=allocrhs; rhs 2693 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs)) { // an infinity rhs 2694 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) status|=DEC_Invalid_operation; rhs 2695 src/decNumber/decNumber.c else decNumberCopy(res, rhs); // +Infinity rhs 2697 src/decNumber/decNumber.c else decNaNs(res, rhs, NULL, set, &status); // a NaN rhs 2704 src/decNumber/decNumber.c ideal=(rhs->exponent&~1)/2; // target rhs 2707 src/decNumber/decNumber.c if (ISZERO(rhs)) { rhs 2708 src/decNumber/decNumber.c decNumberCopy(res, rhs); // could be 0 or -0 rhs 2716 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) { rhs 2728 src/decNumber/decNumber.c workp=MAXI(set->digits+1, rhs->digits); // actual rounding precision rhs 2732 src/decNumber/decNumber.c needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); rhs 2753 src/decNumber/decNumber.c decNumberCopy(f, rhs); rhs 2910 src/decNumber/decNumber.c decCompareOp(t, b, rhs, &workset, COMPARE, &mstatus); // b ? rhs rhs 2942 src/decNumber/decNumber.c Int ae=rhs->exponent+rhs->digits-1; // adjusted exponent rhs 2979 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 2982 src/decNumber/decNumber.c decAddOp(res, lhs, rhs, set, DECNEG, &status); rhs 3008 src/decNumber/decNumber.c decNumber * decNumberToIntegralExact(decNumber *res, const decNumber *rhs, rhs 3016 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs)) decNumberCopy(res, rhs); // an Infinity rhs 3017 src/decNumber/decNumber.c else decNaNs(res, rhs, NULL, set, &status); // a NaN rhs 3021 src/decNumber/decNumber.c if (rhs->exponent>=0) return decNumberCopy(res, rhs); rhs 3024 src/decNumber/decNumber.c workset.digits=rhs->digits; // no length rounding rhs 3027 src/decNumber/decNumber.c decNumberQuantize(res, rhs, &dn, &workset); rhs 3034 src/decNumber/decNumber.c decNumber * decNumberToIntegralValue(decNumber *res, const decNumber *rhs, rhs 3038 src/decNumber/decNumber.c decNumberToIntegralExact(res, rhs, &workset); rhs 3061 src/decNumber/decNumber.c const decNumber *rhs, decContext *set) { rhs 3068 src/decNumber/decNumber.c || rhs->exponent!=0 || decNumberIsSpecial(rhs) || decNumberIsNegative(rhs)) { rhs 3074 src/decNumber/decNumber.c ub=rhs->lsu; // .. rhs 3077 src/decNumber/decNumber.c msub=ub+D2U(rhs->digits)-1; // -> msu of rhs rhs 3210 src/decNumber/decNumber.c decNumber * decNumberCopyAbs(decNumber *res, const decNumber *rhs) { rhs 3211 src/decNumber/decNumber.c decNumberCopy(res, rhs); rhs 3228 src/decNumber/decNumber.c decNumber * decNumberCopyNegate(decNumber *res, const decNumber *rhs) { rhs 3229 src/decNumber/decNumber.c decNumberCopy(res, rhs); rhs 3247 src/decNumber/decNumber.c const decNumber *rhs) { rhs 3249 src/decNumber/decNumber.c sign=rhs->bits & DECNEG; // save sign bit rhs 3592 src/decNumber/decNumber.c const decNumber *rhs, decContext *set, rhs 3622 src/decNumber/decNumber.c if (rhs->digits>reqdigits) { rhs 3623 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, status); rhs 3625 src/decNumber/decNumber.c rhs=allocrhs; rhs 3632 src/decNumber/decNumber.c diffsign=(Flag)((lhs->bits^rhs->bits^negate)&DECNEG); rhs 3637 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); rhs 3641 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs) && diffsign) { rhs 3647 src/decNumber/decNumber.c else bits=(rhs->bits^negate) & DECNEG;// RHS must be Infinity rhs 3662 src/decNumber/decNumber.c decCopyFit(res, rhs, set, &residue, status); // copy (as needed) rhs 3693 src/decNumber/decNumber.c if (ISZERO(rhs)) { // [lhs is non-zero] rhs 3695 src/decNumber/decNumber.c Int rexp=rhs->exponent; // save in case RHS==RES rhs 3696 src/decNumber/decNumber.c bits=rhs->bits; // be clean rhs 3724 src/decNumber/decNumber.c padding=rhs->exponent-lhs->exponent; rhs 3730 src/decNumber/decNumber.c && rhs->digits<=DECDPUN rhs 3731 src/decNumber/decNumber.c && rhs->exponent>=set->emin // [some normals drop through] rhs 3732 src/decNumber/decNumber.c && rhs->exponent<=set->emax-set->digits+1 // [could clamp] rhs 3733 src/decNumber/decNumber.c && rhs->digits<=reqdigits rhs 3737 src/decNumber/decNumber.c partial+=*rhs->lsu; rhs 3748 src/decNumber/decNumber.c partial-=*rhs->lsu; rhs 3775 src/decNumber/decNumber.c bits=(uByte)(rhs->bits^negate); // assumed sign is now that of RHS rhs 3776 src/decNumber/decNumber.c t=lhs; lhs=rhs; rhs=t; rhs 3779 src/decNumber/decNumber.c exponent = rhs->exponent-1; rhs 3780 src/decNumber/decNumber.c exponent += (rhs->digits>reqdigits) ? 0 : rhs->digits-reqdigits-1; rhs 3788 src/decNumber/decNumber.c padding=rhs->exponent-exponent; rhs 3800 src/decNumber/decNumber.c maxdigits=rhs->digits+padding; // virtual length of RHS rhs 3810 src/decNumber/decNumber.c || (res==rhs && rhsshift>0)) { // destructive overlap rhs 3830 src/decNumber/decNumber.c rhs->lsu, D2U(rhs->digits), rhs 3982 src/decNumber/decNumber.c const decNumber *lhs, const decNumber *rhs, rhs 4034 src/decNumber/decNumber.c if (rhs->digits>reqdigits) { rhs 4035 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, status); rhs 4037 src/decNumber/decNumber.c rhs=allocrhs; rhs 4043 src/decNumber/decNumber.c bits=(lhs->bits^rhs->bits)&DECNEG; // assumed sign for divisions rhs 4048 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); rhs 4053 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs) || // two infinities are invalid .. rhs 4085 src/decNumber/decNumber.c if (ISZERO(rhs)) { // x/0 is always exceptional rhs 4107 src/decNumber/decNumber.c exponent=lhs->exponent-rhs->exponent; // ideal exponent rhs 4117 src/decNumber/decNumber.c exponent=rhs->exponent; // [save in case overwrite] rhs 4132 src/decNumber/decNumber.c exponent=(lhs->exponent+lhs->digits)-(rhs->exponent+rhs->digits); rhs 4147 src/decNumber/decNumber.c if (lhs->exponent<=rhs->exponent) { rhs 4185 src/decNumber/decNumber.c maxdigits=rhs->digits+reqdigits-1; rhs 4212 src/decNumber/decNumber.c var2units=D2U(rhs->digits); // rhs actual length (units) rhs 4213 src/decNumber/decNumber.c var2=rhs->lsu; // -> rhs array rhs 4254 src/decNumber/decNumber.c maxexponent=lhs->exponent-rhs->exponent; // save rhs 4425 src/decNumber/decNumber.c if (rhs->exponent<exp) exp=rhs->exponent; rhs 4444 src/decNumber/decNumber.c postshift=var1initpad+exponent-lhs->exponent+rhs->exponent; rhs 4455 src/decNumber/decNumber.c if (rhs->exponent<exponent) exponent=rhs->exponent; rhs 4473 src/decNumber/decNumber.c compare=decUnitCompare(accnext, tarunits, rhs->lsu, D2U(rhs->digits), rhs 4474 src/decNumber/decNumber.c rhs->exponent-exponent); rhs 4515 src/decNumber/decNumber.c exp=rhs->exponent-exponent; // RHS padding needed rhs 4521 src/decNumber/decNumber.c rhs->lsu, D2U(rhs->digits), rhs 4595 src/decNumber/decNumber.c const decNumber *rhs, decContext *set, rhs 4656 src/decNumber/decNumber.c bits=(uByte)((lhs->bits^rhs->bits)&DECNEG); rhs 4661 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); rhs 4665 src/decNumber/decNumber.c ||((rhs->bits & DECINF)==0 && ISZERO(rhs))) { rhs 4676 src/decNumber/decNumber.c if (lhs->digits<rhs->digits) { // swap... rhs 4678 src/decNumber/decNumber.c lhs=rhs; rhs 4679 src/decNumber/decNumber.c rhs=hold; rhs 4691 src/decNumber/decNumber.c if (rhs->digits>set->digits) { rhs 4692 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, status); rhs 4694 src/decNumber/decNumber.c rhs=allocrhs; rhs 4704 src/decNumber/decNumber.c if (rhs->digits>NEEDTWO) { // use fastpath... rhs 4707 src/decNumber/decNumber.c irhs=(rhs->digits+FASTDIGS-1)/FASTDIGS; // .. rhs 4750 src/decNumber/decNumber.c for (count=rhs->digits, cup=rhs->lsu, rip=zrhi; count>0; rip++) rhs 4827 src/decNumber/decNumber.c needbytes=(D2U(lhs->digits)+D2U(rhs->digits))*sizeof(Unit); rhs 4843 src/decNumber/decNumber.c mermsup=rhs->lsu+D2U(rhs->digits); // -> msu+1 of multiplier rhs 4845 src/decNumber/decNumber.c for (mer=rhs->lsu; mer<mermsup; mer++) { rhs 4875 src/decNumber/decNumber.c exponent=lhs->exponent+rhs->exponent; // calculate exponent rhs 4876 src/decNumber/decNumber.c if (lhs->exponent<0 && rhs->exponent<0 && exponent>0) rhs 4976 src/decNumber/decNumber.c decNumber * decExpOp(decNumber *res, const decNumber *rhs, rhs 4983 src/decNumber/decNumber.c const decNumber *x=rhs; // (may point to safe copy later) rhs 5013 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs)) { // an infinity rhs 5014 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) // -Infinity -> +0 rhs 5016 src/decNumber/decNumber.c else decNumberCopy(res, rhs); // +Infinity -> self rhs 5018 src/decNumber/decNumber.c else decNaNs(res, rhs, NULL, set, status); // a NaN rhs 5021 src/decNumber/decNumber.c if (ISZERO(rhs)) { // zeros -> exact 1 rhs 5043 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) d->exponent--; // negative case rhs 5044 src/decNumber/decNumber.c comp=decCompare(d, rhs, 1); // signless compare rhs 5067 src/decNumber/decNumber.c h=rhs->exponent+rhs->digits; rhs 5079 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) a->exponent=-2; // make 0.02 rhs 5084 src/decNumber/decNumber.c Int maxlever=(rhs->digits>8?1:0); rhs 5096 src/decNumber/decNumber.c Int use=-rhs->digits-lever; // exponent to use for RHS rhs 5103 src/decNumber/decNumber.c if (rhs->exponent!=use) { rhs 5105 src/decNumber/decNumber.c needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); rhs 5113 src/decNumber/decNumber.c decNumberCopy(newrhs, rhs); // copy to safe space rhs 5321 src/decNumber/decNumber.c decNumber * decLnOp(decNumber *res, const decNumber *rhs, rhs 5346 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs)) { // an infinity rhs 5347 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) // -Infinity -> error rhs 5349 src/decNumber/decNumber.c else decNumberCopy(res, rhs); // +Infinity -> self rhs 5351 src/decNumber/decNumber.c else decNaNs(res, rhs, NULL, set, status); // a NaN rhs 5354 src/decNumber/decNumber.c if (ISZERO(rhs)) { // +/- zeros -> -Infinity rhs 5360 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) { // -x -> error rhs 5367 src/decNumber/decNumber.c if (rhs->exponent==0 && set->digits<=40) { rhs 5369 src/decNumber/decNumber.c if (rhs->lsu[0]==0 && rhs->lsu[1]==1 && rhs->digits==2) { // ln(10) rhs 5371 src/decNumber/decNumber.c if (rhs->lsu[0]==10 && rhs->digits==2) { // ln(10) rhs 5378 src/decNumber/decNumber.c if (rhs->lsu[0]==2 && rhs->digits==1) { // ln(2) rhs 5391 src/decNumber/decNumber.c p=MAXI(rhs->digits, MAXI(set->digits, 7))+2; rhs 5407 src/decNumber/decNumber.c pp=p+rhs->digits; rhs 5427 src/decNumber/decNumber.c r=rhs->exponent+rhs->digits; // 'normalised' exponent rhs 5436 src/decNumber/decNumber.c decCopyFit(b, rhs, &aset, &residue, &ignore); // copy & shorten rhs 5462 src/decNumber/decNumber.c if (rhs->digits > set->digits) { rhs 5477 src/decNumber/decNumber.c bset.digits=pp+rhs->digits; // wider context rhs 5488 src/decNumber/decNumber.c decMultiplyOp(b, b, rhs, &bset, &ignore); // b=b*rhs rhs 5503 src/decNumber/decNumber.c decCompareOp(&cmp, rhs, &numone, &aset, COMPARE, &ignore); // rhs=1 ? rhs 5519 src/decNumber/decNumber.c bset.digits=pp+rhs->digits; // wider context rhs 5559 src/decNumber/decNumber.c const decNumber *rhs, decContext *set, rhs 5565 src/decNumber/decNumber.c const decNumber *inrhs=rhs; // save original rhs rhs 5580 src/decNumber/decNumber.c if (rhs->digits>reqdigits) { // [this only checks lostDigits] rhs 5581 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, status); rhs 5583 src/decNumber/decNumber.c rhs=allocrhs; rhs 5593 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); rhs 5595 src/decNumber/decNumber.c else if ((lhs->bits ^ rhs->bits) & DECINF) rhs 5728 src/decNumber/decNumber.c const decNumber *rhs, decContext *set, rhs 5746 src/decNumber/decNumber.c if (rhs->digits>set->digits) { rhs 5747 src/decNumber/decNumber.c allocrhs=decRoundOperand(rhs, set, status); rhs 5749 src/decNumber/decNumber.c rhs=allocrhs; rhs 5759 src/decNumber/decNumber.c if (decNumberIsNegative(lhs) && !decNumberIsNegative(rhs)) { rhs 5765 src/decNumber/decNumber.c if (!decNumberIsNegative(lhs) && decNumberIsNegative(rhs)) { rhs 5773 src/decNumber/decNumber.c merged=(lhs->bits | rhs->bits) & (DECSNAN | DECNAN); rhs 5782 src/decNumber/decNumber.c else if (!decNumberIsNaN(rhs)) result=+1; rhs 5784 src/decNumber/decNumber.c else if (decNumberIsSNaN(lhs) && decNumberIsQNaN(rhs)) result=-1; rhs 5785 src/decNumber/decNumber.c else if (decNumberIsQNaN(lhs) && decNumberIsSNaN(rhs)) result=+1; rhs 5789 src/decNumber/decNumber.c rhs->lsu, D2U(rhs->digits), 0); rhs 5799 src/decNumber/decNumber.c if (!decNumberIsNaN(lhs) || !decNumberIsNaN(rhs)) { rhs 5808 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); // propagate NaN rhs 5812 src/decNumber/decNumber.c if (op==COMPMAXMAG || op==COMPMINMAG) result=decCompare(lhs, rhs, 1); rhs 5813 src/decNumber/decNumber.c else result=decCompare(lhs, rhs, 0); // sign matters rhs 5822 src/decNumber/decNumber.c if (lhs->exponent!=rhs->exponent) { rhs 5823 src/decNumber/decNumber.c if (lhs->exponent<rhs->exponent) result=-1; rhs 5842 src/decNumber/decNumber.c uByte srhs=(rhs->bits & DECNEG); rhs 5856 src/decNumber/decNumber.c if (lhs->exponent<rhs->exponent) result=+1; rhs 5861 src/decNumber/decNumber.c if (lhs->exponent>rhs->exponent) result=+1; rhs 5868 src/decNumber/decNumber.c choice=(result>0 ? lhs : rhs); // choose rhs 5893 src/decNumber/decNumber.c static Int decCompare(const decNumber *lhs, const decNumber *rhs, rhs 5902 src/decNumber/decNumber.c if (ISZERO(rhs)) return result; // LHS wins or both 0 rhs 5910 src/decNumber/decNumber.c if (ISZERO(rhs)) sigr=0; rhs 5911 src/decNumber/decNumber.c else if (decNumberIsNegative(rhs)) sigr=-1; rhs 5918 src/decNumber/decNumber.c if ((lhs->bits | rhs->bits) & DECINF) { // one or more infinities rhs 5919 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs)) { rhs 5926 src/decNumber/decNumber.c if (lhs->exponent>rhs->exponent) { // LHS exponent larger rhs 5929 src/decNumber/decNumber.c lhs=rhs; rhs 5930 src/decNumber/decNumber.c rhs=temp; rhs 5934 src/decNumber/decNumber.c rhs->lsu, D2U(rhs->digits), rhs 5935 src/decNumber/decNumber.c rhs->exponent-lhs->exponent); rhs 7216 src/decNumber/decNumber.c static uInt decCheckMath(const decNumber *rhs, decContext *set, rhs 7222 src/decNumber/decNumber.c else if ((rhs->digits>DEC_MAX_MATH rhs 7223 src/decNumber/decNumber.c || rhs->exponent+rhs->digits>DEC_MAX_MATH+1 rhs 7224 src/decNumber/decNumber.c || rhs->exponent+rhs->digits<2*(1-DEC_MAX_MATH)) rhs 7225 src/decNumber/decNumber.c && !ISZERO(rhs)) *status|=DEC_Invalid_operation; rhs 7388 src/decNumber/decNumber.c const decNumber *rhs, decContext *set, rhs 7394 src/decNumber/decNumber.c else if (rhs==NULL); rhs 7395 src/decNumber/decNumber.c else if (rhs->bits & DECSNAN) { rhs 7396 src/decNumber/decNumber.c lhs=rhs; rhs 7400 src/decNumber/decNumber.c else lhs=rhs; rhs 822 src/dps8/dps8_decimal.c int decCompare(decNumber *lhs, decNumber *rhs, decContext *set) rhs 825 src/dps8/dps8_decimal.c cmp = decNumberCompareTotal(&_cmp, lhs, rhs, set); rhs 837 src/dps8/dps8_decimal.c int decCompareMAG(decNumber *lhs, decNumber *rhs, decContext *set) rhs 840 src/dps8/dps8_decimal.c cmpm = decNumberCompareTotalMag(&_cmpm, lhs, rhs, set); rhs 55 src/dps8/dps8_decimal.h int decCompareMAG(decNumber *lhs, decNumber *rhs, decContext *set); rhs 12228 src/dps8/dps8_eis.c rhs 12231 src/dps8/dps8_eis.c