------------------------------------------------------------------ */ decNumberMax -- compare two Numbers and return the maximum */ / This computes C = A ? B, returning the maximum by 754 rules */ / res is C, the result. C may be A and/or B (e.g., X=X?X) */ lhs is A */ rhs is B
| 1530 | /* C must have space for set->digits digits. */ |
| 1531 | /* ------------------------------------------------------------------ */ |
| 1532 | decNumber * decNumberMax(decNumber *res, const decNumber *lhs, |
| 1533 | const decNumber *rhs, decContext *set) { |
| 1534 | uInt status=0; // accumulator |
| 1535 | decCompareOp(res, lhs, rhs, set, COMPMAX, &status); |
| 1536 | if (status!=0) decStatus(res, status, set); |
| 1537 | #if DECCHECK |
| 1538 | decCheckInexact(res, set); |
| 1539 | #endif |
| 1540 | return res; |
| 1541 | } // decNumberMax |
| 1542 | |
| 1543 | /* ------------------------------------------------------------------ */ |
| 1544 | /* decNumberMaxMag -- compare and return the maximum by magnitude */ |
nothing calls this directly
no test coverage detected