I'm reading data from a binary file. I have a document that lets me know how the information is stored. To be sure of this I use XVI32.
I was extracting information string and int data correctly, until I bumped with float data type.
According to this file:
00800000 = 0.0
7AFBDD35 = 0.061087
9BF7783C = -0.003491
00FBFCAD = 0.031416
I tried to solve this with:
struct.unpack('!f', my_float.decode('hex'))[0]
And other different ways....
I tested this information with some online tools like: http://babbage.cs.qc.cuny.edu/IEEE-754/index.xhtml and http://www.binaryconvert.com/result_float.html?decimal=048046048054049048056055, but all of these ways throws me a different value according the original results.
I'm starting to suspect that float information is encrypted or something like that but why string and int weren't encrypted?
Interesting puzzle. Working with the documentation I came up with this: