View Full Version : Hex Viewer floats
Bryan
16-May-2006, 01:34 PM
In Hex Viewer, floating single and floating double values do not change when I change to Big Endian.
I expected Hex Viewer to internally swap the byte order (I'm runing on a little endian machine) then display the float value it found.
Am I missing something or does this feature not work?
The hex viewer is going to show you the raw bytes, not the machine-dependent representation of the bytes - the byte order is whatever is in the file, which doesn't change is you look at it from a different machine.
Chris
17-May-2006, 03:35 PM
I did some looking, and it looks like floating point can be either big endian or little endian, so we should change the single and double floats when the endianness is changed.
Can anyone think of a reason we should not make this change in the Hex Viewer?
Hex Viewer should handle RAW byte only. Why should Hex Viewer handle float? There are many floating point standard as well as single double precision. It is simple to do such comparison, just write a simple C program to output to text file. Then compare using text.
There will be more request if float is implemented, request such as signed/unsigned short, signed/unsigned int, signed/unsigned long, signed/unsigned longlong, binary string, etc. All this on both big/little-endian.
Just stay as RAW byte compare.
My immediate request would be to follow the IEEE 754 standard. The float output is useless to me right now. I have peculiar needs, though.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.