$ cat > dump-fp.c <<EOF
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
void dump_float(float v)
{
uint32_t i;
memcpy(&i, &v, sizeof(i));
printf("0x%08"PRIx32"\n", i);
}
void dump_double(double v)
{
uint64_t i;
memcpy(&i, &v, sizeof(i));
printf("0x%016"PRIx64"\n", i);
}
int main(void)
{
dump_float(1.0f);
dump_double(1.0l);
return 0;
}
EOF
$ gcc dump-fp.c -o dump-fp
$ ./dump-fp
0x3f800000
0x3ff0000000000000