I have data in IEEE 745 hexadecimal format: 0x1.5c28f5c28f5c3p-1
How would I convert this to a float in python? is this a standard module?
>>> float.fromhex('0x1.5c28f5c28f5c3p-1')
0.68
It's in the standard library, float.fromhex
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With