------------------------------------------------------------------ */ 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
| 2877 | /* sNaN will signal), the result is canonical, and zero gets sign 0. */ |
| 2878 | /* ------------------------------------------------------------------ */ |
| 2879 | decFloat * 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 */ |
nothing calls this directly
no test coverage detected