I wrote a socket server that reads data from some devices. After reading data binary shift is applied on bytes. After that i get an integer value for instance 1108304047 and i want to convert this number to IEEE 754 float 35.844417572021484. I found some solutions with struct.unpack but it doesn't seem to me rational. First we convert number to string then convert to float.
Is there any short way like Float.intBitsToFloat(1108304047) in Java.
Aucun commentaire:
Enregistrer un commentaire