------------------------------------------------------------------ */ decFloatAbs -- absolute value, heeding NaNs, etc. */ / result gets the canonicalized df with sign 0 */ df is the decFloat to abs */ set is the context */ returns result
| 1067 | /* will signal) and the result will be canonical. */ |
| 1068 | /* ------------------------------------------------------------------ */ |
| 1069 | decFloat * decFloatAbs(decFloat *result, const decFloat *df, |
| 1070 | decContext *set) { |
| 1071 | if (DFISNAN(df)) return decNaNs(result, df, NULL, set); |
| 1072 | decCanonical(result, df); // copy and check |
| 1073 | DFBYTE(result, 0)&=~0x80; // zero sign bit |
| 1074 | return result; |
| 1075 | } // decFloatAbs |
| 1076 | |
| 1077 | /* ------------------------------------------------------------------ */ |
| 1078 | /* decFloatAdd -- add two decFloats */ |
nothing calls this directly
no test coverage detected