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

Function decNumberMaxMag

extern/decNumber/decNumber.c:1555–1564  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1553/* C must have space for set->digits digits. */
1554/* ------------------------------------------------------------------ */
1555decNumber * 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 */

Callers

nothing calls this directly

Calls 3

decCompareOpFunction · 0.85
decStatusFunction · 0.85
decCheckInexactFunction · 0.85

Tested by

no test coverage detected