------------------------------------------------------------------ */ decFloatMinus -- negate value, heeding NaNs, etc. */ / result gets the canonicalized 0-df */ df is the decFloat to minus */ set is the context */ returns result
| 2638 | /* sNaN will signal), the result is canonical, and zero gets sign 0. */ |
| 2639 | /* ------------------------------------------------------------------ */ |
| 2640 | decFloat * decFloatMinus(decFloat *result, const decFloat *df, |
| 2641 | decContext *set) { |
| 2642 | if (DFISNAN(df)) return decNaNs(result, df, NULL, set); |
| 2643 | decCanonical(result, df); // copy and check |
| 2644 | if (DFISZERO(df)) DFBYTE(result, 0)&=~0x80; // turn off sign bit |
| 2645 | else DFBYTE(result, 0)^=0x80; // flip sign bit |
| 2646 | return result; |
| 2647 | } // decFloatMinus |
| 2648 | |
| 2649 | /* ------------------------------------------------------------------ */ |
| 2650 | /* decFloatMultiply -- multiply two decFloats */ |
nothing calls this directly
no test coverage detected