Name: noko 2011-11-12 3:08
Is there any alternative means (besides those similar to the one depicted) to assign the binary/hexadecimal value of a float?
http://images.4chan.org/g/src/1321083834256.png
http://images.4chan.org/g/src/1321083834256.png
#include <stdio.h>
int main(void) {
float pi;
char *testPi;
testPi = (char *)π
testPi[3] = 0x40;
testPi[2] = 0x49;
testPi[1] = 0x0F;
testPi[0] = 0xDB;
printf("%3.80f\n", pi);
return 0;
}