Hi
There are many problems with floating point numbers:
- there is a standard for representing them (IEEE 754), but the C++ standard doesn't impose to use it
- IEEE 754 imposes nothing about endianess
- the C++ standard imposes nothing about the size of floating point types
So it's nearly impossible to ensure that floating point numbers are converted to the same representation for network transmission. We can just assume that the target OSes and compilers all use IEEE 754 single/double precision for the C++ types float and double, and that the endianness is consistent.