Subject: floats across the network
To: David Laight <>
From: Michael Richardson <>
List: tech-net
Date: 08/07/2002 17:12:20
>>>>> "David" == David Laight <> writes:
    >> I am having a doubt whether on sending between
    >> little endian and big endian machines floats have also
    >> to be converted like int (ntohl) or they are not to be
    >> converted.

    David> They will almost certainly need to be converted.
    David> In many cases reversing all the bytes will suffice,
    David> however some architectures (eg arm) use a mixed
    David> byte ordering for floats, others may use a non-standard
    David> encoding.

  I thought that float representation varried rather a lot between
processors. The number of bits of mantissa, etc.

]       ON HUMILITY: to err is human. To moo, bovine.           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [