4 Apr
2016
4 Apr
'16
5:45 p.m.
On 2016-04-04 20:21, Peter Dimov wrote:
Andrey Semashev wrote:
On a platform with non-IEEE floats, does write_le32 have to convert to IEEE format before producing the bits in p?
Yes.
What if the x value on the current platform is not representable in IEEE float?
It would put the closest representable IEEE value into the bits in p. Not much different from passing a double for x.
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.