printing hex format for floating point number


I am trying to print a hex value ( 4111999A for 9.1) for a corresponding floating point number. The routine convertToHexString in APFFloat class only prints in C99 Floating point hexagondecimal constant (eg 1.e00000p3).

Without writing my own routine, how do I get to print the hexadecimal representation for a floating point value?


You can bitcast it to an integer of the same size and print that, I believe. APFloat::bitcastToAPInt().