IEEE 754 float representation of a number

tommys bob_tommy at hotmail.com
Mon Dec 9 09:38:37 EST 2002


hmmm. Expected the line 
struct.pack('>f',3.04) to return these four bytes:

'\x40\x42\x8f\x5c' (IEEE 754 format)

but instead 

'@B\x8f\\' was returned.

What have I missed here??? 
Very grateful for any help!



More information about the Python-list mailing list