The C++ standard does not discuss the underlying layout of float and double types, only the range of values they should represent. (This is also true for signed types, is i
Create an appropriate serializer/de-serializer interface for writing/reading this.
The interface can then have several implementations and you can test your options.
As said before, obvious options would be:
Just remember - once you have this layer, you can always start with IEEE754 if you only support platforms that use this format internally. This way you'll have the additional effort only when you need to support a different platform! Don't do work you don't have to.