3 ms·
> IEEE 754 floats don't have different endianess. The standard does not specify endianness [1]. From the standard point of view float is a sequence of bits. Bu
by ycmbntrthrwaway 11y ago
> IEEE 754 floats don't have different endianess.
The standard does not specify endianness [1]. From the standard point of view float is a sequence of bits. But if you memory-map the file and store float on little-endian machine, you get bytes reversed compared to how it is written in the standard. On big-endian machine sign is stored in the first byte, and on little-endian machine sign is stored in the last byte.
[1] https://en.wikipedia.org/wiki/Endianness#Floating-point https://en.wikipedia.org/wiki/Endianness#Floating-point
- DiThi 11y agoDamn, you're right... therefore I have no idea how a simple float quantization algorithm I did could even work.