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

Function decNumberMinMag

extern/decNumber/decNumber.c:1601–1610  ·  view source on GitHub ↗

------------------------------------------------------------------ */ decNumberMinMag -- compare and return the minimum by magnitude */ / 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

1599/* C must have space for set->digits digits. */
1600/* ------------------------------------------------------------------ */
1601decNumber * decNumberMinMag(decNumber *res, const decNumber *lhs,
1602 const decNumber *rhs, decContext *set) {
1603 uInt status=0; // accumulator
1604 decCompareOp(res, lhs, rhs, set, COMPMINMAG, &status);
1605 if (status!=0) decStatus(res, status, set);
1606 #if DECCHECK
1607 decCheckInexact(res, set);
1608 #endif
1609 return res;
1610 } // decNumberMinMag
1611
1612/* ------------------------------------------------------------------ */
1613/* decNumberMinus -- prefix minus operator */

Callers

nothing calls this directly

Calls 3

decCompareOpFunction · 0.85
decStatusFunction · 0.85
decCheckInexactFunction · 0.85

Tested by

no test coverage detected