I'm trying to understand, I'm a beginner.
I want to do arithmetic operations with float numbers in binary.
I was using http://www.binaryconvert.com/result_float.html to do the conversion
Only he returns me:
1069547520.000000
1069547520.000000
2139095040.000000
What is it?
I was hoping for this:
00111111110000000000000000000000
00111111110000000000000000000000
01000000010000000000000000000000
%f in printf() would be wrong too?
#include <stdio.h>
int main()
{
float a = 0b00111111110000000000000000000000; /* 1.5 */
float b = 0b00111111110000000000000000000000; /* 1.5 */
float c;
c = a + b; /* 3.0 !? */
printf("%f\n", a);
printf("%f\n", b);
printf("%f\n", c);
return 0;
}