------------------------------------------------------------------ */ decNumberMaxMag -- compare and return the maximum by magnitude */ / 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
| 1553 | /* C must have space for set->digits digits. */ |
| 1554 | /* ------------------------------------------------------------------ */ |
| 1555 | decNumber * decNumberMaxMag(decNumber *res, const decNumber *lhs, |
| 1556 | const decNumber *rhs, decContext *set) { |
| 1557 | uInt status=0; // accumulator |
| 1558 | decCompareOp(res, lhs, rhs, set, COMPMAXMAG, &status); |
| 1559 | if (status!=0) decStatus(res, status, set); |
| 1560 | #if DECCHECK |
| 1561 | decCheckInexact(res, set); |
| 1562 | #endif |
| 1563 | return res; |
| 1564 | } // decNumberMaxMag |
| 1565 | |
| 1566 | /* ------------------------------------------------------------------ */ |
| 1567 | /* decNumberMin -- compare two Numbers and return the minimum */ |
nothing calls this directly
no test coverage detected