Convert a byte array to a float (IEEE 754)

Is there anyway to convert a byte array (received via UDP) to a floating point number?

The byte array is 4-bits, and is encoded as a 32-bit IEEE 754 single precision float.

Implementing the decoding algorithm seems quite annoying, especially since there is no bit shifting allowed.

Shocked there's no way to do this already!


Please sign in to leave a comment.