Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <stdio.h>
#include <math.h>
// take a hex number and make it back into the original float
int main(int argc, char **argv)
{
if(argc != 2)
{
return -1;
}
float x = 0xb407b260;
sscanf(argv[1],"%x",&x);
printf("%.50f\n",(float )x);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.