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

Function decFloatPlus

extern/decNumber/decBasic.c:2879–2885  ·  view source on GitHub ↗

------------------------------------------------------------------ */ decFloatPlus -- add value to 0, heeding NaNs, etc. */ / result gets the canonicalized 0+df */ df is the decFloat to plus */ set is the context */ returns result

Source from the content-addressed store, hash-verified

2877/* sNaN will signal), the result is canonical, and zero gets sign 0. */
2878/* ------------------------------------------------------------------ */
2879decFloat * decFloatPlus(decFloat *result, const decFloat *df,
2880 decContext *set) {
2881 if (DFISNAN(df)) return decNaNs(result, df, NULL, set);
2882 decCanonical(result, df); // copy and check
2883 if (DFISZERO(df)) DFBYTE(result, 0)&=~0x80; // turn off sign bit
2884 return result;
2885 } // decFloatPlus
2886
2887/* ------------------------------------------------------------------ */
2888/* decFloatQuantize -- quantize a decFloat */

Callers

nothing calls this directly

Calls 2

decCanonicalFunction · 0.85
decNaNsFunction · 0.70

Tested by

no test coverage detected