binary presentation of IEEE 754
-
Forgive me for a programming-related question; none of the message boards seems applicable but I hope some CPian can help me here. I understand big and little endian storage for multibyte scalar types, but how about IEEE 754 single (32bit) and double (64 bit) floats? Are these to be seen as streams of bits or bytes and thus stored in the same order, or will the byte order be mirrored between little and big endian systems? I'm thinking of applications of different endian style, sharing IEEE754 floats via binary files, or via shared memory between two CPU. TIA, Bernd
-
Forgive me for a programming-related question; none of the message boards seems applicable but I hope some CPian can help me here. I understand big and little endian storage for multibyte scalar types, but how about IEEE 754 single (32bit) and double (64 bit) floats? Are these to be seen as streams of bits or bytes and thus stored in the same order, or will the byte order be mirrored between little and big endian systems? I'm thinking of applications of different endian style, sharing IEEE754 floats via binary files, or via shared memory between two CPU. TIA, Bernd
In my experience (embedded systems on big-endian PowerPC, Windows on little-endian Pentiums), floating point numbers are treated the same as integer quantities (i.e. PowerPC byte-ordering for floats is the opposite of Pentium). Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'