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

Function decFloatCompareTotalMag

extern/decNumber/decBasic.c:1793–1806  ·  view source on GitHub ↗

------------------------------------------------------------------ */ decFloatCompareTotalMag -- compare magnitudes with total ordering */ / result gets the result of comparing abs(dfl) and abs(dfr) */ dfl is the first decFloat (lhs) */ dfr is the second decFloat (rhs) */ returns result, which may be -1, 0, or 1

Source from the content-addressed store, hash-verified

1791/* returns result, which may be -1, 0, or 1 */
1792/* ------------------------------------------------------------------ */
1793decFloat * decFloatCompareTotalMag(decFloat *result,
1794 const decFloat *dfl, const decFloat *dfr) {
1795 decFloat a, b; // for copy if needed
1796 // copy and redirect signed operand(s)
1797 if (DFISSIGNED(dfl)) {
1798 decFloatCopyAbs(&a, dfl);
1799 dfl=&a;
1800 }
1801 if (DFISSIGNED(dfr)) {
1802 decFloatCopyAbs(&b, dfr);
1803 dfr=&b;
1804 }
1805 return decFloatCompareTotal(result, dfl, dfr);
1806 } // decFloatCompareTotalMag
1807
1808/* ------------------------------------------------------------------ */
1809/* decFloatCopy -- copy a decFloat as-is */

Callers

nothing calls this directly

Calls 2

decFloatCopyAbsFunction · 0.85
decFloatCompareTotalFunction · 0.85

Tested by

no test coverage detected