[ I'm sorry I couldn't thread this to my original posting, but it
expired on our news server. ]
I would like to thank everyone who replied. The nearly unanimousQuote:> I'm writing a network application where I need to pass double
> precision floating point values between many different architectures.
> Is there a good/standard way of doing this?
gave the best summary:
The xdr library seems to be available on every machine that supportsQuote:> look into using xdr. It is a set of functions associated with
> your rpc library. xdr (external data representation) provides
> machine independent representation for all sorts of data structures
> including doubles. Use xdr to translate to a "generic" representation,
> send that over then net, then use the xdr on the receiver's end
> to get that machine's native representation.
nfs and rpc -- just about everybody these days. xdr uses the IEEE-754
standard for floating point, so the conversion from double is a no-op
for most machines.
Given the near universal usage of IEEE-754 representation, a fact I
was previously unaware of, I have decided to use it directly in my
protocol. To keep things simple, I have decided not to use the xdr
library until such time as a conversion to IEEE-754 is actually