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?
I have noticed that SGI and SPARC machines use the same internal
formats, and DEC (r2k, r3k) machines use the same format, but with the
byte ordering reversed. I _could_ cast the double value to an
unsigned long and then send it through htonl() and ntohl(), but that
would cause all sorts of problems if I ever came across a machine that
used some other form of internal representation.
Any suggestions?
Please reply via e-mail; I will summarize to the net.
Peter Johansson