NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Serialization of binary floating point numbers



On 05/17, Sad Clouds wrote:
> A bit of a random question/thought - what is a good and portable method
> of storing/transmitting binary floating point numbers?

Maybe heavier than you'd like, but Protocol Buffers has a double type:

  https://developers.google.com/protocol-buffers/docs/proto3#scalar

Another possibility is XDR which has IEEE float and IEEE double types:

  https://en.wikipedia.org/wiki/External_Data_Representation

Lewis


Home | Main Index | Thread Index | Old Index