------------------------------------------------------------------ */ decFloatGetCoefficient -- get coefficient as BCD8 */ / df is the decFloat from which to extract the coefficient */ bcdar is where DECPMAX bytes will be written, one BCD digit in */ each byte (BCD8 encoding); if df is a NaN the first byte will */ be zero, and if it is infinite they will all be zero
| 1060 | /* payload of a qNaN or sNaN. */ |
| 1061 | /* ------------------------------------------------------------------ */ |
| 1062 | Int decFloatGetCoefficient(const decFloat *df, uByte *bcdar) { |
| 1063 | if (DFISINF(df)) memset(bcdar, 0, DECPMAX); |
| 1064 | else { |
| 1065 | GETCOEFF(df, bcdar); // use macro |
| 1066 | if (DFISNAN(df)) bcdar[0]=0; // MSD needs correcting |
| 1067 | } |
| 1068 | return GETSIGN(df); |
| 1069 | } // decFloatGetCoefficient |
| 1070 | |
| 1071 | /* ------------------------------------------------------------------ */ |
| 1072 | /* decFloatGetExponent -- get unbiased exponent */ |
no outgoing calls
no test coverage detected