Subject: Re: floats across the network
To: Michael Richardson <>
From: Ignatios Souvatzis <>
List: tech-net
Date: 08/07/2002 23:29:08
On Wed, Aug 07, 2002 at 05:12:20PM -0400, Michael Richardson wrote:
> >>>>> "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.

using XDR routines will help, if you want a ready to use solution.


seal your e-mail: