I'm getting the wrong number when converting bits to float in C#.
Let's use this bit number= 1065324597
In Java, if I want to convert from bits to float I would use intBitsToFloat
method
int intbits= 1065324597;
System.out.println(Float.intBitsToFloat(intbits));
Output: 0.9982942
which the correct output the I want to get in C#
However, in C# I used
int intbits= 1065324597;
Console.WriteLine((float)intbits);
Output: 1.065325E+09
Wrong!!
My question is how would you convert inbitsToFloat in C#?
My attempt: I looked to the documentation here http://msdn.microsoft.com/en-us/library/aa987800(v=vs.80).aspx but I still have the same trouble