Andrey Semashev wrote:
Since you convert the input value, possibly even losing information, this is no longer about endian conversion but rather serialization. At least, that's not what I expect from an endian library.
Once again, my point is that this interface handles representational differences as well as mere endianness differences. There is no (interface-imposed) need to make the library not work. Yes, if your platform's float can't be represented exactly in IEEE 32 bit, or if IEEE 32 bit can't be represented exactly in your platform's float, the roundtrip will not be perfect. Making the library not work purely out of spite is of no help though. The file still has 32 bit IEEE little-endian floats in it and you're expected to read or produce it. This is the task that the library is supposed to solve.