Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-03-29 11:50:59


There was a recent discussion on this list regarding portable representation
of floating point numbers.

No one was able to find a portable way to transmit all types of NaNs from
one machine architecture/compiler to any other. That is, the effort is
stymied even before issues of representation arise.

Robert Ramey

Cliff Green wrote:
>> Sometimes it is necessary to send floats and doubles as well between
>> different hosts.
>
> When dealing with floating points, there's all kinds of issues,
> including (as already mentioned) IEEE754 or other formats.
>
> By the time you have a generalized "marshalling" scheme that handles
> integers, floats, strings, etc, you've re-invented protocols such as
> XDR (eXternal Data Representation - see
> http://en.wikipedia.org/wiki/External_Data_Representation). Maybe
> there should be a Boost library for encoding and decoding to XDR?
> There's other possibilities such as SDXF or CDR (used in Corba).
>
>> It would be really nice if boost.asio or boost.whatever automagically
> handled
>> such floating-point primitives in the most efficient yet portable
>> manner.
>
> Whatever is added to Boost for encoding / marshalling and decoding /
> unmarshalling should be separate from libraries such as Asio - it can
> be
> used by multiple libraries, any time objects / data needs to be
> transported among multiple platforms / systems, whether through a
> network or file system ... And definitely there should hooks to
> Boost.Serialization.
>
> Cliff
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk