MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / decNumberMin

Function decNumberMin

extern/decNumber/decNumber.c:1578–1587  ·  view source on GitHub ↗

------------------------------------------------------------------ */ 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

Source from the content-addressed store, hash-verified

1576/* C must have space for set->digits digits. */
1577/* ------------------------------------------------------------------ */
1578decNumber * 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 */

Callers

nothing calls this directly

Calls 3

decCompareOpFunction · 0.85
decStatusFunction · 0.85
decCheckInexactFunction · 0.85

Tested by

no test coverage detected