------------------------------------------------------------------ */ decNumberMin -- compare two Numbers and return the minimum */ / This computes C = A ? B, returning the minimum 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
| 1576 | /* C must have space for set->digits digits. */ |
| 1577 | /* ------------------------------------------------------------------ */ |
| 1578 | decNumber * decNumberMin(decNumber *res, const decNumber *lhs, |
| 1579 | const decNumber *rhs, decContext *set) { |
| 1580 | uInt status=0; // accumulator |
| 1581 | decCompareOp(res, lhs, rhs, set, COMPMIN, &status); |
| 1582 | if (status!=0) decStatus(res, status, set); |
| 1583 | #if DECCHECK |
| 1584 | decCheckInexact(res, set); |
| 1585 | #endif |
| 1586 | return res; |
| 1587 | } // decNumberMin |
| 1588 | |
| 1589 | /* ------------------------------------------------------------------ */ |
| 1590 | /* decNumberMinMag -- compare and return the minimum by magnitude */ |
nothing calls this directly
no test coverage detected