I am trying to calibrate a battery pack that uses a BQ27742-g1 gas gauge IC. In doing the current calibration in order to calculate the ccGain and ccDelta the numbers must be converted from floating point to a special type of floating point understood by the gas gauge. I followed their flow chart in the sluuax0b.pdf document (Section A.11) and wrote some c code to convert the number. My problem is that I am questioning my results and have no way to test the answer I receive to make sure it is correct. The byte0, byte1, and byte2 numbers I am getting end up being negative numbers, which I don't think is correct. Does anyone have any code that implements their algorithm that they would be willing to share? Or some example conversions of floating point numbers that I can check to make sure my algorithm is working?