in reply to Re^3: Float/double to hex?
in thread Float/double to hex?
Here is what I am looking for (running inside "perl -d -e 1"):
x 2**16
65536
x unpack('h*', pack('i', 65535))
'ffff0000'
$x = 1 / 7
x $x
0.142857142857143
x unpack('h*', pack('f', $x))
'529421e3'