I am trying to write a program that converts a given decimal value to IEEE representation of 32-bit Hex value.
For example:
Input: 1.0
, Output: 0x3f800000
I store the value in a variable like the following:
float a = 1.0;
The compiler actually does the conversion of 1.0
to a Hex value. Is it possible to get the Hex value somehow from inside the C program?