On Jun 10, 8:41 am, Ulrich Eckhardt wrote:
> I need to pack a floating point value into a vector of 32-bit unsigned
> values in IEEE format. Further, I maintain a CRC32 checksum for integrity
> checking. For the latter, I actually need the float as integral value.
...
> What I'm wondering is wheth
Ulrich Eckhardt wrote:
I need to pack a floating point value into a vector of 32-bit unsigned
values in IEEE format. Further, I maintain a CRC32 checksum for integrity
checking. For the latter, I actually need the float as integral value.
What I currently do is ... pack and unpack the float usin
Ulrich Eckhardt wrote:
> I need to pack a floating point value into a vector of 32-bit unsigned
> values in IEEE format. Further, I maintain a CRC32 checksum for integrity
> checking. For the latter, I actually need the float as integral value.
>
> What I currently do is this:
>
> tmp = struct
Ulrich Eckhardt wrote:
> Hi!
>
> I need to pack a floating point value into a vector of 32-bit unsigned
> values in IEEE format. Further, I maintain a CRC32 checksum for integrity
> checking. For the latter, I actually need the float as integral value.
>
> [...]
You could try using frexp to ext
Hi!
I need to pack a floating point value into a vector of 32-bit unsigned
values in IEEE format. Further, I maintain a CRC32 checksum for integrity
checking. For the latter, I actually need the float as integral value.
What I currently do is this:
tmp = struct.pack("=f", f)
(i,) = struct.un